Page 1 of 1
optimize PNG Image for Web Sites
Posted: 2011-02-18T01:08:23-07:00
by linjuming
i use the png files for css backgrounds.
i use the faststone phpoto resizer which can optimize a png file from 2M to 465k . the optimized png looks the same as the old one.
can IM do it ? no lossing optimizing ?
can you good guys print out your IM code for png optimizing ? primarily for css background.
Re: optimize PNG Image for Web Sites
Posted: 2011-02-18T20:44:17-07:00
by anthony
IM saves PNG images, bt does nto do a lot of optimizing. It will for example switch between Indexed, 24bit and 32 bit PNG images.
If you want PNG optimization I suggest you use an proper PNG optimizer
http://www.imagemagick.org/Usage/formats/#png_non-im
Re: optimize PNG Image for Web Sites
Posted: 2011-02-19T03:10:41-07:00
by linjuming
Thanks,best wish
Re: optimize PNG Image for Web Sites
Posted: 2011-02-26T09:11:43-07:00
by glennrp
You can try writing to the PNG8 (PNG sub-format).
With IM-6.6.7-10, this will reduce the colors to less than 256
if necessary, using a quick-and-dirty reduction to a 3-3-2
pallette. This is of course a lossy operation.
With earlier versions this probably won't work.
If you don't like that result you will have to use the "-colors 255"
option (for better color quantization) before writing the image.
../glennrp