Page 2 of 2

Re: (IM7) Find same pixel in n images

Posted: 2016-08-24T23:02:04-07:00
by fmw42
See -set at http://www.imagemagick.org/Usage/masking/#alpha_set. I generally prefer -alpha on, if I know the image has transparency. But it is no always need, unless you have used -alpha off. -alpha set may turn your image opaque if you have already used -alpha off. So unless you have alpha off, just don't include -set, unless you want to give an opaque image a transparent alpha or a transarent image an opaque alpha.

Re: (IM7) Find same pixel in n images

Posted: 2016-08-24T23:02:58-07:00
by fmw42
But I think we digress. What was our original issue and has it been solved?

Re: (IM7) Find same pixel in n images

Posted: 2016-08-24T23:28:50-07:00
by snibgo
Well... on IM v7.0.2-5 on Windows 8.1, this is what happens:

Code: Select all

%IMG7%magick -size 10x10 xc:White w.png
w.png is opaque white, of course. Let's separate the alpha channel:

Code: Select all

%IMG7%magick w.png -channel A -separate +channel x.png
x.png is black. Huh? The problem (I think) is that under v7, w.png doesn't have an alpha channel. So IM returns zero for that channel that doesn't exist. (I think this is stupid behaviour. If there is no alpha, the image is opaque, so the alpha should be taken as 100%.)

The workaround is to use "-alpha set".

Code: Select all

%IMG7%magick w.png -alpha set -channel A -separate +channel x2.png
Now we get a sensible result. x2.png is white.

Re: [Closed] (IM7) Find same pixel in n images

Posted: 2016-09-28T17:32:53-07:00
by jmac698
Thanks for the help, I processed a few images, but have moved on to a custom solution programmed in Python with a stats package.