I am using Image Magick to resize/optimize images to 100x100 and I was hopeing to have all resultant images less than 5k in size. What I have found is that while most come out to be less than 5k, some come out much larger...one as large as 25k (I don't even know how this is possible?).
Is there any possible way for me to force a max size and have Image Magick calculate what the quality should be?
I looked through all the "utilities" on their website and didn't see anything, but its 4:30am and I am really tired, so I figure I could be missing something.
If there isn't any way to do the above, is there any way I can improve the following, besides the obvious option of lowering the quality:
$messages = /usr/local/bin/mogrify -geometry '100x100>' -compress JPEG -quality 80 $sitedirectory/ads/$picture;
For example, what exactly does the "-sampling-factor" effect? Will it effect the image size at all?
This is the description of it:
"This option specifies the sampling factors to be used by the JPEG encoder for chroma downsampling. If this option is omitted, the JPEG library will use its own default values. When reading or writing the YUV format and when writing the M2V (MPEG-2) format, use -sampling-factor 2x1 to specify the 4:2:2 downsampling method."
I apologize for my randomness, as I said, I am very tired...
Thanks,
Andrew