Page 1 of 1

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

Posted: 2016-09-10T06:55:35-07:00
by Marsu42
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.