Page 1 of 1

Image Magick 7 VS 6, for some command not working in 6, but 7 is much slower

Posted: 2019-07-02T09:01:03-07:00
by niyanwen
Hi,

I am working in industry and need to use image magick to process images. I stated using image magick last month, with image magick 6.9, it works well, then for some use case, like detect transparent image and compare image, result of 6 doesn't match result of 7, and I believe result of 7 is correct. When I switched to 7, I found the speed is much slower, which is not endurable

so either can anyone tell me if these command are supported in image magick 6?
And is there a way to increase the speed of image magick 7, it is too slow now

the command working in image magick 7 but not in 6:
1. convert transparent_image.png -format "%[fx:mean.a]" info:

2. convert -metric "AE" image1.png image2.png ---- this one is partially works....

Re: Image Magick 7 VS 6, for some command not working in 6, but 7 is much slower

Posted: 2019-07-02T09:20:02-07:00
by snibgo
On speed comparisons: what version are you using? Do they use HDRI?


This works for me in 6.9.9-50:

Code: Select all

convert transparent_image.png -format "%[fx:mean.a]" info:
However, the meaning of "alpha" is reversed to the norm. In this command, 0 means opaque and 1 means transparent.

Re: Image Magick 7 VS 6, for some command not working in 6, but 7 is much slower

Posted: 2019-07-02T10:19:16-07:00
by niyanwen
for 6 we are using 6.9.4_1 ( 6.9.4_1.203308.0 )
for 7 we are using 7.x ( 7.x.200529.0 )

so is there any way to increase the speed of 7? if not we will stick with 6

Re: Image Magick 7 VS 6, for some command not working in 6, but 7 is much slower

Posted: 2019-07-02T10:24:18-07:00
by fmw42
so is there any way to increase the speed of 7?
Run

Code: Select all

convert -version
for IM 6 and

Code: Select all

magick -version
for IM 7.

Show what is returned. Look to see if either show HDRI. If IM 7 does and IM 6 does not, then recompile IM 7 without HDRI support. Be sure both have the same Q Level as reported above, typically Q16. Recompile as Q8 may help.

Re: Image Magick 7 VS 6, for some command not working in 6, but 7 is much slower

Posted: 2019-07-02T10:58:47-07:00
by niyanwen
I have some error to check the version since my cloud desktop install IM6, and I need to check the version actually generated in bin by java
I am working on fix this, for now what I can only find is

for IM6 it shows libMagickCore-6.Q16
for IM7, islibMagickCore-7.Q16HDRI


personally I would stick with IM6, since this is the recommend version in our industry, since we don't officially switch to IM7 yet
but do you know if there is a bug when comparing image to see if they are same in IM6?

this is the command I am using, but in did not work for some image
convert -metric "AE" image1.png image2.png

Re: Image Magick 7 VS 6, for some command not working in 6, but 7 is much slower

Posted: 2019-07-02T11:11:52-07:00
by fmw42
That is not a correct command. It should be the following (assuming the two images are exactly the same size). Note compare not convert.

Code: Select all

compare -metric AE image1.png image2.png null:
or

Code: Select all

compare -metric AE image1.png image2.png diffimage.png
Where null: means no ouput image and diffimage.png can be any name or suffix and would show the differences. See

https://legacy.imagemagick.org/script/compare.php
https://imagemagick.org/Usage/compare/

For IM 7, it would need to be prefaced with magick, so

Code: Select all

magick compare -metric AE image1.png image2.png null:

Re: Image Magick 7 VS 6, for some command not working in 6, but 7 is much slower

Posted: 2019-07-02T14:17:03-07:00
by niyanwen
I got it work, thanks