possible bug on save when using -write IM 6.7.8.10beta

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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug on save when using -write IM 6.7.8.10beta

Post by fmw42 »

IM 6.7.8.10beta Q16 Mac OSX SnowLeopard

I am finding that saving an output, the results look different if one adds -write xxx before the output image.

It depends upon the format of the xxx image, but especially with gif. This is happening when using -selective blur with or without -mask.

The results appear to be affected by the gif quantization even in the actual output.

Is this a bug or correct behavior?

Look carefully at the top of the image in the gray area to the left of her hair.



Input:
Image


No Write added -- correct result:
imb convert 1tmp12.png -selective-blur 0x2+10% +mask 1tmp21_no_write.png
Image


You may need to flicker the results to see the differences.
Write to gif added -- corrupted, noisy result:
imb convert 1tmp12.png -selective-blur 0x2+10% +mask -write 1tmp_sb.gif 1tmp21_gif_write.png
Image


If I use -mask, it is even worse.

Mask (binary):
Image

No Write added -- correct result:
imb convert 1tmp12.png -mask 1tmp3.png -selective-blur 0x2+10% +mask 1tmp20_no_write.png
Image


Write to gif added -- corrupted, noisy result:
imb convert 1tmp12.png -mask 1tmp3.png -selective-blur 0x2+10% +mask -write 1tmp_sb.gif 1tmp20_gif_write.png
Image
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug on save when using -write IM 6.7.8.10beta

Post by magick »

Some image formats have particular requirements and the image is modified accordingly before it is written. GIF, for example, requires an image colormap. If the image does not have a colormap, one is created before it is written in the GIF format. This change persists after the image is written. If you want to eliminate side-effects, use the +write option.
Post Reply