>> File sizes:
>> *.eps: ~ 12 MB
>> *.gif + *.jpg: ~ 380 KB
>> *.png: ~ 485 KB
>>
>> Maybe we can compress the .png files better; I used 'convert' w/o
>> any options to convert them. Suggestions ?
Compared to gif, I've noticed png is often much smaller
for colormap versions of images. I guess its compression algo
is better.
You just have to pick the smallest colormap size
where the image still looks OK. This is usually an empirical
process of trying different colormap values. I usually start
with 16 and step up by eights: eg. 16, 24, 32, 48, 64..
If I get to 64, I usually consider using jpeg instead,
and start comparing file sizes.
I found pngs convert really well using this technique.
Sometimes the images can be surprisingly small.
When using convert(1) for png's I use:
-quality 100 -colors 16
..and ramp the 16 value up (as described above) and check the
file size, deciding if I need a jpeg instead. Jpeg artifacts can
sometimes look bad in print, but fine on screen, so I try to avoid
jpegs for screen captures unless there's a lot of gradients in the
image.
Similarly in gimp, right before saving, I use Image -> Mode -> Colormap,
then set the colormap to the lowest number possible (same #s above)
where the image still looks OK, then save that. Then I usually
'undo' the Mode->Colormap so that I can continue to edit the image
in the default RGB mode.
In gimp, certain image operations aren't available when your image
is in "colormap" mode.
I also don't want colormap artifacts to "accumulate" (same goes for
jpegs);
it's bad if you keep reloading an image that's been jpg or colormap
compressed;
the artifacts get worse, degrading the image to where you have to start
from scratch (unless you saved a lossless version of the image,
eg. gimp's native .xcf format)
Png does have a lossless compression (if you don't convert to a colormap
first), but its compression is not as good as jpeg.
Thing is, many of our widgets are starting to have gradients
in them. Grads don't usually work in colormap space efficiently.
I'm not sure what are good settings for pngs when it comes to
grads. Usually I switch to jpegs when I can't get a reasonable
compression out of png's.
> png is just a wrapper for different compression algorithms. Most png images
> use jpeg compression internally.
I didn't know pngs could also use jpeg compression; news to me.
I guess I've never seen a png with jpeg artifacts before.
The most common usage of png's I've seen is gif style color maps
with whatever compression that uses. It's good for lineart.
It also has some kind of 'lossless' compression that I don't know
much about. Usually jpegs give better compression with the least
artifacts (if you carefully play around with the quality level
using similar empirical tests to the above, but making the numbers
/smaller/, starting with eg. 80 and going down in increments of 10 or
so)
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev