Page 1 of 1

output difference between 6.8.5 and 7.0.2

Posted: 2016-08-25T14:55:04-07:00
by luckyluca
Hi,

I've updated my installation of imagemagick from 6.8.5 to 7.0.2 and noticed the output images are not elaborated the same way as before.
Starting from an aerial view I would run a conversion which filtered colors and added snow in some areas of the original image. Since recently the colors come out wrong (pink green).

Image
result in 6.8.5:
Image

result in 7.0.2
Image
code:

Code: Select all

"ImageMagick-6.8.5-Q16\convert" tmp\INPUT_g2xpl_8_16_35680_40240.jpg -normalize -fuzz 14.0% -fill white -opaque #519556 -threshold 99% -fill black -colorize 5% -blur 0x1.0 -resize 1024x1024 tmp\INPUT_g2xpl_8_16_35680_40240.tga_mask_green.tga

"ImageMagick-6.8.5-Q16\convert" tmp\INPUT_g2xpl_8_16_35680_40240.jpg -normalize -fuzz 45.0% -fill white -opaque #f1f1d9 -threshold 99% -blur 0x0.8 -resize 1024x1024 tmp\INPUT_g2xpl_8_16_35680_40240.tga_mask_roads.tga

"ImageMagick-6.8.5-Q16\convert" tmp\INPUT_g2xpl_8_16_35680_40240.jpg -normalize -fuzz 15% -fill white -opaque 'rgb(50,40,40)' -threshold 99% -blur 0x1.0 -resize 1024x1024 tmp\INPUT_g2xpl_8_16_35680_40240.tga_mask_dark.tga

"ImageMagick-6.8.5-Q16\convert" tmp\INPUT_g2xpl_8_16_35680_40240.jpg -brightness-contrast 5 -blur 0x0.5 -resize 1024x1024 tmp\INPUT_g2xpl_8_16_35680_40240_0.tga

"ImageMagick-6.8.5-Q16\convert" -size 1024x1024^ canvas:white tmp\INPUT_g2xpl_8_16_35680_40240_0.tga tmp\INPUT_g2xpl_8_16_35680_40240.tga_mask_green.tga -composite tmp\INPUT_g2xpl_8_16_35680_40240_0.tga tmp\INPUT_g2xpl_8_16_35680_40240.tga_mask_roads.tga -composite tmp\INPUT_g2xpl_8_16_35680_40240_0.tga tmp\INPUT_g2xpl_8_16_35680_40240.tga_mask_dark.tga -composite tmp\city.jpg

Can you kindly please help debugging this?

Re: output difference between 6.8.5 and 7.0.2

Posted: 2016-08-25T15:23:43-07:00
by snibgo
Do you really run all those from the command line? If they are in a BAT file, the percentages % should be doubled %%.

Re: output difference between 6.8.5 and 7.0.2

Posted: 2016-08-25T15:38:20-07:00
by fmw42
IM 6.8.5.x was undergoing changes in colorspace and grayscale from linear to non-linear. So IM 6.8.5 is not trustworthy. See if the latest IM 6 behaves differently from the latest IM 7. If not, provide a simple command that can demonstrate the difference.

You have a lot of commands. Which command or commands produces the images presented? Can you provide one simple command and the resulting image that shows the problem.

Re: output difference between 6.8.5 and 7.0.2

Posted: 2016-08-26T01:42:07-07:00
by luckyluca
Thanks for your replies.
The last command (see below) is the one causing the erratic result. All previous lines work fine.
I expected to be something to do with colour space, I'm just not familiar enough with recent developments of imagemagick to figure out what has changed:
what the code does in 6.8.5 is creating a white canvas and using three masks ([..]mask_green [..]mask_roads [..]mask_dark) to introduce this white canvas onto the original image INPUT_g2xpl_8_16_35680_40240_0.tga

Code: Select all

"ImageMagick-6.8.5-Q16\convert" -size 1024x1024^ canvas:white tmp\INPUT_g2xpl_8_16_35680_40240_0.tga tmp\INPUT_g2xpl_8_16_35680_40240.tga_mask_green.tga -composite tmp\INPUT_g2xpl_8_16_35680_40240_0.tga tmp\INPUT_g2xpl_8_16_35680_40240.tga_mask_roads.tga -composite tmp\INPUT_g2xpl_8_16_35680_40240_0.tga tmp\INPUT_g2xpl_8_16_35680_40240.tga_mask_dark.tga -composite tmp\city.jpg
I just tested it, 6.9.5-7 works absolutely fine.

p.s.
regarding % symbols I'll add double %% however a single % doesn't seem to be causing issues at the moment.

Re: output difference between 6.8.5 and 7.0.2

Posted: 2016-08-26T08:49:08-07:00
by snibgo
"ImageMagick-6.8.5-Q16\convert" -size 1024x1024^ canvas:white...
What is the caret ^ for? It's probably harmless, but I suggest you remove it.