in reply to Re^3: How to create JPEG of specified size
in thread How to create JPEG of specified size

Pseudocode, since I don't have ImageMagick installed here.
# load original image (lena.jpg) # get original image's geometry # do # inflate dimensions by 1.2* # resize image to target geometry # add a little scatter noise to the image # set target quality to a high number like 99 # save target image (lenna.jpg) to disk # while (target image file size is too small);
The scatter noise and quality numbers are to frustrate jpeg's compression as the image grows.

Are we talking gigabytes of disk space? I think jpeg as a format will break at 2^15 (or maybe 2^16) pixel dimensions.

--
[ e d @ h a l l e y . c c ]