Req: -define jpeg:extent for jpeg2000 (and other lossy formats)

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
User avatar
Posts: 79
Joined: 2014-06-12T03:17:45-07:00
Authentication code: 6789
Location: Berlin

Req: -define jpeg:extent for jpeg2000 (and other lossy formats)

Post by Marsu42 » 2016-09-10T06:55:35-07:00

I'm using the latest im7, and it seems the upper file size limit (-define jpeg:extent) indeed only works for jpeg images.

As far as I understand it, this option just initiates a dumb trial-and-error to find´the compression that matches the requested filesize? If this isn't specific to the jpeg compression, it would be nice to get this working at least with jpeg2000 and probably other recent fancy lossy formats.

That's b/c in my experience at least for jp2 files there can be vast differences in output file size depending on how difficult to compress the encoder finds the source. For my recent batch of nature shots, that's 100k to 500k, which is too unpredictable if I want to mail them or put them into a pdf with a capped max. size limit. Of course I *could* do a scripted search for the matching compression, but it would be nice to do it inside im.

Post Reply