Hello everyone! I'm currently working on a website that will utilize several hundred very small PNGs, all of which I created in Photoshop. I learned of PNGout's superior compression of PNGs and downloaded the most recent version of Irfanview (3.97) and the PNGout plugin.
Problem is, when I try to convert my existing PNGs I seem to lose the alpha (transparency) channel, which is absolutely necessary for my site. I used the default settings in the PNGout save options and also tried changing the 'color type' from 'auto' to 'RGB+alpha,' which I thought would solve the problem. It didn't. I also tried the 'save transparent color' option in the Irfanview save options, but that also didn't work, as I want the white background (which is actually transparent in the original file) to be transparent, but not the white that's part of the image. Sorry if this is hard to follow.
The original image (try viewing it on backgrounds of different colors/gradients):
http://webpages.charter.net/spoondagger/blackbone04.png
The resulting image without transparency:
http://webpages.charter.net/spoondagger/blackbone04new.png
Please help me to convert my PNGs properly! Any advice is appreciated.
Awesoken at
IrfanView does not support alpha natively. When you load an image, it throws away the alpha channel. You can restore the alpha just before saving, but only if your image has a single color that is 100% transparent. To do this, you must select "Save Transparent Color" and use the color picker just before saving. Unfortunately, this method is not very convenient, and in many cases, it isn't sufficient.
If you need to preserve alpha, you should use the command-line version of PNGOUT. If you're uncomfortable with using the command prompt, then you can try PNGGauntlet.
spoondagger at
I'm afraid Irfanview's 'save transparent color' option is, as you said, insufficient for me. And since I'll need to run over five hundred PNGs through PNGOUT, doing them one at a time simply isn't practical. Too bad batch processing isn't supported, though I'm sure there's a reason for this.
Guess I'll give PNGGauntlet a try. Thanks for the recommendation, and thanks for a great utility that unfortunately won't work for this project. I look forward to trying it next time! Cheers.
spoondagger at
Ah, I didn't realize PNGOUT was integrated INTO PNGGauntlet!
Ran my first directory of 225 Photoshop PNGs through the Gauntlet using the 'brute force' option, and here are the results: total filesize of all 225 PNGs...
BEFORE: 524 KB
AFTER: 185 KB
That's...just absurd! Thank you so much, Ken!
Martin at
spoondagger said
doing them one at a time simply isn't practical
Why not use a for loop? ^^
counting_pine at
Yes, FOR is useful. You can use it like this:
for %i in (*.png) do pngout "%i"
(If you use it in a batch file, you will need to use %%i instead of %i)
One method I like, which doesn't involve the command line, is to just add PNGOUT as one of the actions associated with PNGs, using the "File Types" tab in "Folder Options". Then you just need to select all the files you want to optimise, right click them, and select the new PNGOUT command.
(Although in this case, it may not be best to do them all in one go, because it will open up several hundred PNGOUT windows at once. I haven't tried it, but I have a feeling that this action may be regrettable.)
spoondagger at
Thanks for the help, counting_pine and Martin! I think I'm quite happy using PNGGauntlet, in which processing large batches isn't a problem.