feature request: PNG support
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- SargeBaldy
- Posts: 366
- Joined: Tue Jul 15, 2003 3:49 pm
- Location: Oregon
- Contact:
feature request: PNG support
PNG support for textures would vastly reduce the size of a wad with a lot of new textures. a 256x256 BMP is 193k. a PNG of that same image would only be 20 or 21k. with high res textures, a zdoom wad can easily balloon up to a fairly considerable size. is PNG support at all practical?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49228
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Chris wrote:This, and .wad.gz/.wgz support would rule muchly. *nodnods* zlib even comes with gzio routines which supposedly mirror stdio FILE routines, I think.
I think it would be more efficient to compress single lumps instead of the whole WAD at once. Unless the .gz format has some very sophisticated searching features this could seriously affect the performance of the game.
Whilst I agree, using png would almost certainly be smaller than the current format, I'm pretty sure the current format is not BMP. You may be using BMPs as your source image, but your editing tool will be converting them to Doom format graphics for the WAD.
As for the actual benefits, versus disadvantages of this. Meh! I dunno. I am bothered about file download size. Once I have a file on my HD, I don't really care how big it expands/unzips to. I also wouldn't like anything that hits Zdoom performance.
As for the actual benefits, versus disadvantages of this. Meh! I dunno. I am bothered about file download size. Once I have a file on my HD, I don't really care how big it expands/unzips to. I also wouldn't like anything that hits Zdoom performance.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49228
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
If there is an 8-bit format without a palette, yes. Otherwise for small graphics you'll get a significant increase in size due to the added palettes.Enjay wrote:Whilst I agree, using png would almost certainly be smaller than the current format, I'm pretty sure the current format is not BMP. You may be using BMPs as your source image, but your editing tool will be converting them to Doom format graphics for the WAD.
Packing every lump with ZLib doesn't significantly hit performance. If a lump has to be read in there is so much system overhead that the decompression time hardly matters.As for the actual benefits, versus disadvantages of this. Meh! I dunno. I am bothered about file download size. Once I have a file on my HD, I don't really care how big it expands/unzips to. I also wouldn't like anything that hits Zdoom performance.
All depends what you want to believe
Ignoring the 32 bit stuff (we've gone over the huge file sizes here before - PNG or no PNG), it's really not that different for 8-bit. All depends on the image color contents/variation of course since that determines how well it will compress -a cartoon is the best and real life pictures the worst.
Here's a comparison of 2 8-bit images in PNG vs DOOM format that use a fairly wide color range (198 colors the KingTut mask):
PNG = 3707 (PSP, Photoshop was much larger even with various options 5000 or so)
DOOM = 4680 (always this size if not transparent - transparent of course saves a LOT more)
ZIP (of BMP) = 4083
Even it is 1/2 on the average (don't remember, but I think that's what I figured out a long time ago for JDOOM - not the figure Bald gave, in fact the same test image for 256x256, 24bit is 196kb for BMP and 104kb for PNG, not even close to what was claimed . If you zip the BMP, file size is 134kb hardly worth it.
Besides, as far as file size goes, not an issue. If you ZIP the PWAD, you get basically the same size reduction as for PNG (in the graphics).
File size is all about bandwidth concerns ( storage and download). Download size is no different (when zipped) and the first is not even close to the issue it was 3 years ago. IOW, filesize is a 2nd or 3rd level concern.
And since encoding increases the program memory resource footprint - that's a negative aspect
There are much better things to do then put all that effort into native PNG (or ZIP) support in ZDOOM. KISS has many advantages.

Ignoring the 32 bit stuff (we've gone over the huge file sizes here before - PNG or no PNG), it's really not that different for 8-bit. All depends on the image color contents/variation of course since that determines how well it will compress -a cartoon is the best and real life pictures the worst.
Here's a comparison of 2 8-bit images in PNG vs DOOM format that use a fairly wide color range (198 colors the KingTut mask):
PNG = 3707 (PSP, Photoshop was much larger even with various options 5000 or so)
DOOM = 4680 (always this size if not transparent - transparent of course saves a LOT more)
ZIP (of BMP) = 4083
Even it is 1/2 on the average (don't remember, but I think that's what I figured out a long time ago for JDOOM - not the figure Bald gave, in fact the same test image for 256x256, 24bit is 196kb for BMP and 104kb for PNG, not even close to what was claimed . If you zip the BMP, file size is 134kb hardly worth it.
Besides, as far as file size goes, not an issue. If you ZIP the PWAD, you get basically the same size reduction as for PNG (in the graphics).
File size is all about bandwidth concerns ( storage and download). Download size is no different (when zipped) and the first is not even close to the issue it was 3 years ago. IOW, filesize is a 2nd or 3rd level concern.
And since encoding increases the program memory resource footprint - that's a negative aspect

There are much better things to do then put all that effort into native PNG (or ZIP) support in ZDOOM. KISS has many advantages.
- SargeBaldy
- Posts: 366
- Joined: Tue Jul 15, 2003 3:49 pm
- Location: Oregon
- Contact:
How long has there been a bit depth option in the video modes menu?zarcyb wrote:When can we expect to see truecolour

I will probably also add support for JPEG textures whenever I write the truecolor renderer. Maybe DXTC/S3TC compressed textures, too.
OMG! ARE YOU SAYING THAT WE CAN MAKE GREAT LOOKING THINGS?randy wrote:How long has there been a bit depth option in the video modes menu?zarcyb wrote:When can we expect to see truecolourThough playing Enjay's NJMA01 makes me want to actually spend time writing it. The new palette used there looks really good, and I think Doom could look very nice if it wasn't restricted by a 256 color palette.
I will probably also add support for JPEG textures whenever I write the truecolor renderer. Maybe DXTC/S3TC compressed textures, too.
