convert -define jpeg:extent not working in 6.8.8-7

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
modrljin
Posts: 4
Joined: 2014-02-26T06:34:57-07:00
Authentication code: 6789

convert -define jpeg:extent not working in 6.8.8-7

Post by modrljin »

Hello,

convert -define jpeg:extent=Xkb not working in latest release 6.8.8-7

I have tried it on both win Q16 x64 and on linux debian. Converted image is always produced with the same or almost the same size (with few kB difference).
After that I have tried the same command with version win 6.7.7-0 Q16 x64 and it worked as expected.

modrljin
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert -define jpeg:extent not working in 6.8.8-7

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.8-8 Beta available by sometime tomorrow. Thanks.
modrljin
Posts: 4
Joined: 2014-02-26T06:34:57-07:00
Authentication code: 6789

Re: convert -define jpeg:extent not working in 6.8.8-7

Post by modrljin »

Hi again,

this is still not working in version 6.8.8-8. Tried on win only.

modrljin
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert -define jpeg:extent not working in 6.8.8-7

Post by magick »

Give us a command we can reproduce, what you get, and what you expect. We need to reproduce the problem before we can comment further.
modrljin
Posts: 4
Joined: 2014-02-26T06:34:57-07:00
Authentication code: 6789

Re: convert -define jpeg:extent not working in 6.8.8-7

Post by modrljin »

Command is same as in first post: convert -define jpeg:extent=Xkb
If I execute something like this:

convert -define jpeg:extent=600kb image.jpg image-600.jpg

where image.jpg is, for example, 20 MB, image-600.jpg shouldn't be about 20 MB, but less than 600 kB.
I thought you said in your first reply that you are able to reproduce this!?

thanks
modrljin
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert -define jpeg:extent not working in 6.8.8-7

Post by magick »

Use this command:
  • convert image.jpg -quality 0 -define jpeg:extent=600KB image-600.jpg
We will have a patch in ImageMagick 6.8.8-9 Beta so the -quality 0 option is not necessary. Also, note KB must be uppercase.
modrljin
Posts: 4
Joined: 2014-02-26T06:34:57-07:00
Authentication code: 6789

Re: convert -define jpeg:extent not working in 6.8.8-7

Post by modrljin »

OK, I tried like that and it works.

BTW. here http://imagemagick.org/script/command-l ... php#define is written:

jpeg:extent=value
Restrict the maximum JPEG file size, for example -define jpeg:extent=400kb. The JPEG encoder will search for the highest compression quality level that results in an output file that does not exceed the value. The -quality option is ignored if it is also present.

where kb is lowercase.

I tried now upper and lowercase and both works.

thanks
modrljin
Post Reply