[Pkg-gmagick-im-team] Bug#797107: imagemagick: On certain images -opaque turns all white pixels black regardless of color or -fill color instructions

ian ian at churchkey.org
Thu Aug 27 20:16:33 UTC 2015


Package: imagemagick
Version: 8:6.9.1.2-1
Severity: normal

Dear Maintainer,

Since upgrading to Jessie I have encountered a problem while 
using the -opaque setting for imagemagick's convert tool. On 
certain images imagemagick defaults to replacing all white 
pixels with black ones regardless of what values you use for
the -opaque color or -fill color. The images that produe this 
problem are output from the Scantailor processing tool for 
working with scanned book page images. I can reproduce the 
problem with both newly created images and with archived 
files that imagemagick succesfully processed in Wheezy. 

I initially reported the problem to the maintainer of the 
djvubind tool, which is used to postprocess the output images 
from scantailor and which is the tool actively invoking 
imagemagick, and the author helped me isolate the relevant 
imagemagick invocation. That discussion is here if it proves 
helpful: https://github.com/strider1551/djvubind/issues/19 

I posted test images and the result images of running the
below commands here: http://churchkey.org/imagemagick/

"bookpageGimpSource.tif" is the original page before 
processing by scantailor.

running:
"""
convert "bookpageGimpSource.tif" -opaque black "bookpageGimpSource-ImageMagickOutput.tif" 
"""

produces the expected result: All black pixels are removed 
and a white fill is put in their place. changing the "black"
to "white" and adding a "-fill green" also works as expected.

"bookpageGimpSource-ScantailorProcessed.tif" is the source 
image after scantailor processing. 

running:
"""
convert "bookpageGimpSource-ScantailorProcessed.tif" -opaque black "bookpageGimpSource-ScantailorProcessed-ImageMagickOutput.tif"
"""

reproduces the bug: all white pixels are now black even though 
black pixels were the ones -opaque was told to look for. Changing
that "black" to "white" and adding a "-fill green" produces an
identical image.

I am running all of these commands on a virtual machine with 
a clean jessie install so if there is anything you need me to 
install or run, just let me know. As always, thank you for all
the work you do with Debian and for your time looking at this 
issue.

-Ian

-- Package-specific info:
ImageMagick program version
---------------------------
animate:  ImageMagick 6.9.1-2 Q16 x86_64 2014-04-09 http://www.imagemagick.org
compare:  ImageMagick 6.9.1-2 Q16 x86_64 2014-04-09 http://www.imagemagick.org
convert:  ImageMagick 6.9.1-2 Q16 x86_64 2014-04-09 http://www.imagemagick.org
composite:  ImageMagick 6.9.1-2 Q16 x86_64 2014-04-09 http://www.imagemagick.org
conjure:  ImageMagick 6.9.1-2 Q16 x86_64 2014-04-09 http://www.imagemagick.org
display:  ImageMagick 6.9.1-2 Q16 x86_64 2014-04-09 http://www.imagemagick.org
identify:  ImageMagick 6.9.1-2 Q16 x86_64 2014-04-09 http://www.imagemagick.org
import:  ImageMagick 6.9.1-2 Q16 x86_64 2014-04-09 http://www.imagemagick.org
mogrify:  ImageMagick 6.9.1-2 Q16 x86_64 2014-04-09 http://www.imagemagick.org
montage:  ImageMagick 6.9.1-2 Q16 x86_64 2014-04-09 http://www.imagemagick.org
stream:  ImageMagick 6.9.1-2 Q16 x86_64 2014-04-09 http://www.imagemagick.org

-- System Information:
Debian Release: 8.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages imagemagick depends on:
ii  imagemagick-6.q16  8:6.9.1.2-1

imagemagick recommends no packages.

imagemagick suggests no packages.

-- no debconf information



More information about the Pkg-gmagick-im-team mailing list