Can I use convert to upsample images to a specific filesize?

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?".
User avatar
Posts: 8884
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

From IM Examples on JPEG images, write settings ... #jpg_write
NOTE: You can not determine a quality to get a specific filesize, except by trying it. The best way is to say try (a quality of) 75% and see the result if to large reduce by 10%, if two small increase. Then do a binary search to find the quality that best matches what file size you want. Shouldn't take more than 5 to 6 trys to figure it out.

Of course you did not specify JPEG, though that is probably the most common for general images. But we can't help you much further without knowning what format you are using.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages