Changing png compression (level) in gdImagePngPtrEx doesn't affect the result...
[email protected] ("Andrei Stebakov") Tue, 7 Oct 2008 17:07:07 -0400
| Newsgroups | php.gd.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi I am using LibGD from the lisp environment (cl-gd) and I have problems compressing png files when I create a new image by copying a part of original png file. What happens under the lisp wrapper is a sequence of gdImageCopyResampled and gdImagePngPtrEx. If I vary the level variable from 0 to 9 (which is called "compression" in lisp wrapper) the size of resulting png image stays the same. I am wondering if I can do anything to compress the final image? Does it happen because the original png image already compressed and gdImagePngPtrEx can't do any further compression? The size I am getting is around 95K. When I try to trim it using optipng it sheds another 18%. If I convert it to jpg (with 100% quality) the image is around 25K. I am wondering can I compress it to say 50K using gdImagePngPtrEx? I am just trying to optimize it for web and 95K looks a bit bigger than I want for a 400x400 image. The reason I don't want to use jpeg is that when I convert it to jpeg, the red color becomes blotchy even with 100% quality. Any suggestions are welcome! Thank you, Andrew