Page 1 of 1

compare with "-lowlight-color transparent" shows up as black

Posted: 2017-11-13T03:00:29-07:00
by guysoft
Hey,
I had compare working fine, but after an upgrade to Ubuntu 17.04 it started showing "transparent" as black.

Here is a command example:

Code: Select all

compare  -highlight-color magenta -lowlight-color transparent a.png b.png  -compose src -colorspace sRGB diff.png
Image Magik version:

Code: Select all

compare --version
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP 
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
Attaching output.

For comparison, attaching the output also from a different machine

a.png:
Image
b.png:
Image

diff.png:
Image

diff on a different computer:
Image

Re: compare with "-lowlight-color transparent" shows up as black

Posted: 2017-11-13T11:34:58-07:00
by fmw42
I can confirm that this has changed somewhere between IM 6.9.4.0 and 6.9.5.8 Mac OSX Sierra. It does not show transparency for the current IM 6.9.9.23 or IM 7.0.7.11. Sorry I do not have current access to versions in-between those. Using Anthony's images from http://www.imagemagick.org/Usage/compare/, I get:

Input:
Image
Image


IM 6.9.4.0

Code: Select all

compare bag_frame1.gif bag_frame2.gif -compose src -highlight-color red -lowlight-color none diff6940.gif
Image


IM 6.9.5.8

Code: Select all

compare bag_frame1.gif bag_frame2.gif -compose src -highlight-color red -lowlight-color none diff6958.gif
Image

Re: compare with "-lowlight-color transparent" shows up as black

Posted: 2017-11-15T19:28:17-07:00
by fmw42
Lowlight now works properly to maintain the transparency in both IM 6.9.9.24 beta and IM 7.0.7.12 beta

Re: compare with "-lowlight-color transparent" shows up as black

Posted: 2017-11-19T05:45:11-07:00
by guysoft
fmw42 wrote: 2017-11-15T19:28:17-07:00 Lowlight now works properly to maintain the transparency in both IM 6.9.9.24 beta and IM 7.0.7.12 beta
I tried with 6.9.9.23 and got an all black image - did you commit something to fix it?

I see commits 3a65092a0 ("Fix lowlight color bug", 2017-11-15) and c6641b299 ("Don't deactivate alpha channel", 2017-11-15). They might have been pushed after post.

compiling and will report

Re: compare with "-lowlight-color transparent" shows up as black

Posted: 2017-11-19T11:53:30-07:00
by fmw42
Read the versions I posted. It is fixed in 6.9.9.24 not 6.9.9.23. The .24 version is a beta, so it has not been released as an official version. However, you can download and install the beta, if it is urgent. http://magick.imagemagick.org/download/beta/

Re: compare with "-lowlight-color transparent" shows up as black

Posted: 2017-11-22T07:39:32-07:00
by guysoft
Ok, so it works from commit be27412d970c1455b99cf416fac22c589b8fcaea. Should I update the topic to [SOLVED] or something?

Also, I don't download, I compile here :)