Page 1 of 1

possible bug on save when using -write IM 6.7.8.10beta

Posted: 2012-08-11T11:24:28-07:00
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

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

Posted: 2012-08-11T14:29:50-07:00
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.