Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
One of your inputs is a jpeg. I suspect it is a photograph, and these don't compress so well in png format. (Partly because png is lossless, but mostly because png just isn't designed to compress photographs well).
If you save the result to jpg, you can probably get a much smaller file size.
"Quality" refers to quality of the image, so higher number give better quality but *lower* compression.
Thanks snibgo. Tried changing output image to jpg. newimage.jpg size is now 342kb (compared to 600+kb). Smaller than saving as a png but not as small as I expected.
Any other tips without an overall effect on quality? Thanks
I think the default IM uses for saving jpegs is 85. Perhaps your input files don't warrant this, so you might try "-quality 50" or 25 or 10. (I often find that 50 is good enough for web work, and would expect 10 to be very small but horrble quality.)
I wish IM (and other tools) had an automatic facility to save files with lowest subjectively justifiable quality, but this is a Hard Problem. It might not be difficult for a tool to detect gross artifacts introduced by the lossy compression.
Hmm. Perhaps a script could use "-metric" to graph size versus quality setting, and find an optimum. I'll add this to my huge pile of "things to try when I can find the time".