I don't know if you feel this is over the top, but for what it's worth I'd like to do IM internally what I'm currently doing scripted with multiple runs: When defining "-define jpeg:extent" imho what is of interest very often is not to go higher than a certain *maximal* size, not to have a *fixed* size.
Current behavior: With a batch of sample images and a certain quality, I end up between 700k and 2400k. In this example I'm setting "-define jpeg:extent=1500k". However, this results in a way too low compression for the images with good compressibility, essentially wasting space and bandwidth.
Suggested behavior: Define both "-define jpeg:extent=1500k" and "-quality xyz" in conjunction and let IM choose whatever comes out smallest.
Feature suggestion: max. "-define jpeg:extent" (patch doesn't work)
Feature suggestion: max. "-define jpeg:extent" (patch doesn't work)
Last edited by Marsu42 on 2015-03-06T09:43:19-07:00, edited 1 time in total.
Re: Feature suggestion: max. "-define jpeg:extent"
Download / install ImageMagick 6.9.0-8 Beta tomorrow. It has a patch to improve the results of the jpeg:extent define.
Re: Feature suggestion: max. "-define jpeg:extent"
That's great news, IM gets my award for the most responsive oss teammagick wrote:Download / install ImageMagick 6.9.0-8 Beta tomorrow. It has a patch to improve the results of the jpeg:extent define.
I'll have to wait until there are windows binaries to test the change, I'm done trying to compile IM myself with cygwin/mingw x64 as all these additional required libs for a full build are too much of a hassle for a casual compile.
Re: Feature suggestion: max. "-define jpeg:extent" (patch doesn't work)
I now had the opportunity to test the new windows binary " ImageMagick 6.9.0-9 Q16 x64 2015-02-28", and unfortunately it doesn't work as intended. For example with two test files with same dimensions, but very different compressibility (bad.tif & good.tif) I've tried to run these commands:magick wrote:Download / install ImageMagick 6.9.0-8 Beta tomorrow. It has a patch to improve the results of the jpeg:extent define.
a) "convert -quality 75" results in good.jpg=1mb, bad.jpg=6mb
b) "convert -quality 75 -define jpeg:extent=5000kb" results in *both* files being about 5mb
What I had in mind is that in case b) good.jpg should stay at 1mb, but "bad.jpg" should be clipped at 5mb (instead of 6) so that the combination of -quality and jpeg:extent behave like a "upper ceiling" option.
Am I doing something wrong, what does the patch you announced above actually do? Thanks for any insight!
Re: Feature suggestion: max. "-define jpeg:extent" (patch doesn't work)
We'll have a patch in ImageMagick 6.9.0-10 Beta by sometime tomorrow to address your suggestion.
Re: Feature suggestion: max. "-define jpeg:extent" (patch doesn't work)
Thanks, it's working nowmagick wrote:We'll have a patch in ImageMagick 6.9.0-10 Beta by sometime tomorrow to address your suggestion.