Page 1 of 1
Save images in indexed 8-bit PNG format
Posted: Tue Aug 04, 2009 2:47 pm
by Janis
Hello!
I would like to suggest an option to save images in indexed 8-bit PNG format.
Thank you!
Re: Save images in indexed 8-bit PNG format
Posted: Wed Aug 05, 2009 3:41 am
by marsh
Janis wrote:
I would like to suggest an option to save images in indexed 8-bit PNG format.
This might be what you're looking for:
View menu>Image>Convert to Colours...
Save as PNG afterwards.
Re: Save images in indexed 8-bit PNG format
Posted: Wed Aug 05, 2009 6:40 pm
by Janis
Hmm… Yes, it's exactly what I asked for and almost what I wanted.

Thanks for the reply! Although having used Adobe Photoshop much, it's not easily found that I must to this in order to get PNG-8.
Why I said "almost what I wanted" is that Adobe Photoshop still beats XnView regarding the PNG file size (which is basically the biggest reason I would like to use PNG-8 instead of PNG-24 or 32).
I just tested by creating an image with 19 colours. I saved it as PNG-24 and PNG-8 with both XnView and Adobe Photoshop (CS2).
PNG-24 Xnview = 15.8 KB
PNG-24 Photoshop = 14.6 KB
PNG-8 XnView = 10.7 KB
PNG-8 Photoshop = 8.5 KB
Adobe Photoshop's size is smaller in both cases even with the additional Software and Gamma value meta data it adds that XnView doesn't have.
Also Photoshop has smarter algorithm (several options actually) for converting to 256 (or less) palette image. The gradient I had in my sample image looked quite nice with all three Photoshop's algoritms, while it looked quite terrible with XnView's. It would be very nice if XnView would improve its function too.
Re: Save images in indexed 8-bit PNG format
Posted: Wed Aug 05, 2009 7:17 pm
by Clo
Janis

Hello !
• Are a few KiB more so important, while nowadays the HDs reach 1TiB
and the RAM amounts follow accordingly ?
• Well,
Pierre is the
only developer of XnView, while Adobe has probably 2 or 3 dozens of programmers…
- However, if you want to get the smallest PNG weight, you can re-process them using the
PngOut add-on.
The gain isn't huge, though, but you might get roughly the same sizes than using PhotoShop…

Re: Save images in indexed 8-bit PNG format
Posted: Wed Aug 05, 2009 7:30 pm
by XnTriq
- File » Export... » PNG » Color mode/Compression level
- Tools » Options... » General » Read/Write » Write » Parameters » PNG » Compression level
xnview ([url=http://newsgroup.xnview.com/viewtopic.php?p=75511#p75511]Uncalled-for format conversion[/url]) wrote:rondus18 wrote:Alright, before I try it again I have a question about PNG compression. XnView gives me the option to chose between compression levels 0-9. PNGs are lossless so if I set it to the highest compression I won't lose any image quality, will I? I mean, what's the draw back to using level 9 compression over the default, level 6? Would a higher level change it to an 8-bit PNG?
Yes it's lossless, it's the compression level used by zlib
fnord: SuperPNG
SuperPNG is a free Adobe Photoshop plug-in for using PNG (“ping”) files. It is faster than Adobe's own PNG plug-in and saves considerably smaller PNGs.
Re: Save images in indexed 8-bit PNG format
Posted: Thu Aug 06, 2009 6:42 am
by eL_PuSHeR
You can dramatically reduce PNG filesize using one of these freebies:
Ken Silverman's PNGout
Cosmin Truta's OptiPNG
Both of them are free and work like a charm. I prefer Ken Silverman's better, although a tad slower.
Re: Save images in indexed 8-bit PNG format
Posted: Thu Aug 06, 2009 8:46 pm
by Janis
Thank you all for the replies!
I shall probably try one of those programs, and thanks for the File -> Export option! I didn't know about it, it looks good for testing with different parameters. And Adaptive mode was the one I thought ugly (I wander why it is the default one used by "Convert to colors" though...), Floyd Steinberg mode was quite OK.
By the way, what are the filters for saving as PNG? What do they do? Regarding the file size they all made it bigger. So I would think there is some other meaning.
P.S. OK, sorry, I understand now why Floyd Steinberg is not the default one. I was looking at a gradient, where Floyd Steinberg did the better job, but in case of plain colour it generated some fake pattern whereas Adaptive gave the same or a similar but plain colour not a pattern.
Re: Save images in indexed 8-bit PNG format
Posted: Fri Aug 07, 2009 6:44 am
by eL_PuSHeR
PNG preprocessing filters are for reducing filesize even more in a lossless fashion. For paletted images (8bpp and some <13bpp), NONE will yield the best results. For grayscale images, AUTO (MIXED) will usually yield the best results. For maximum compression is better to try them all (using a batch file for instance), but be warned that trying certain number of iterations will take some time.
Re: Save images in indexed 8-bit PNG format
Posted: Sat Aug 08, 2009 7:43 am
by Janis
I see, thanks for the explanation!