output difference between 6.8.5 and 7.0.2

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
luckyluca
Posts: 12
Joined: 2011-10-04T13:25:21-07:00
Authentication code: 8675308

output difference between 6.8.5 and 7.0.2

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: output difference between 6.8.5 and 7.0.2

Post by snibgo »

Do you really run all those from the command line? If they are in a BAT file, the percentages % should be doubled %%.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: output difference between 6.8.5 and 7.0.2

Post 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.
luckyluca
Posts: 12
Joined: 2011-10-04T13:25:21-07:00
Authentication code: 8675308

Re: output difference between 6.8.5 and 7.0.2

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: output difference between 6.8.5 and 7.0.2

Post 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.
snibgo's IM pages: im.snibgo.com
Post Reply