I wanted to do a "-compose Add" to a number of images, to add them all together. When pixels have partial transparency, "-evaluate-sequence Sum" gives the wrong result.
So, as a feature request (perhaps for v7), I ask for "-composite-sequence" which is such that:
convert in1.png i2.png in3.png ... -compose XXX -composite-sequence out.png
gives exactly the same result as:
convert -compose XXX in1.png -composite i2.png -composite in3.png ... -composite out.png
Unlike "-composite", "-composite-sequence" wouldn't use a third image as a mask.
Feature request: "-composite-sequence"
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Feature request: "-composite-sequence"
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Feature request: "-composite-sequence"
see if -poly has the same issue with transparency.
-flatten should work, though not sure about the add issue. see http://www.imagemagick.org/Usage/layers ... thumbnails
How about -compose add -layers merge? Does that work?
-flatten should work, though not sure about the add issue. see http://www.imagemagick.org/Usage/layers ... thumbnails
How about -compose add -layers merge? Does that work?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Feature request: "-composite-sequence"
What is it that you are trying to do with the alpha channels --- add the pixels only where opaque or only where transparent? And what happens when the there is 8-bit alpha rather than binary alpha? Can you clarify a bit further about the processing functionality you desire?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Feature request: "-composite-sequence"
"-poly" gives the same result (practically) as "-evaluate-sequence Sum".
"-compose Add -composite" and "-compose Add -layers merge" give two other results.
F:\web\im>%IM%convert xc:rgba(10%,20%,30%,0.9) xc:rgba(40%,50%,60%,0.1) -poly "1,1 1,1" txt:
# ImageMagick pixel enumeration: 1,1,65535,srgba
0,0: (50.0008%,69.9992%,90.0008%,1) #8000B332E666 srgba(50.0008%,69.9992%,90.0008%,1)
F:\web\im>%IM%convert xc:rgba(10%,20%,30%,0.9) xc:rgba(40%,50%,60%,0.1) -evaluate-sequence Sum txt:
# ImageMagick pixel enumeration: 1,1,65535,srgba
0,0: (50.0008%,69.9992%,90.0008%,0.999985) #8000B332E666FFFE srgba(50.0008%,69.9992%,90.0008%,0.999985)
F:\web\im>%IM%convert xc:rgba(10%,20%,30%,0.9) xc:rgba(40%,50%,60%,0.1) -compose Add -composite txt:
# ImageMagick pixel enumeration: 1,1,65535,srgba
0,0: (13.0007%,22.9999%,33.0007%,0.909987) #21483AE1547BE8F4 srgba(13.0007%,22.9999%,33.0007%,0.909987)
F:\web\im>%IM%convert xc:rgba(10%,20%,30%,0.9) xc:rgba(40%,50%,60%,0.1) -compose Add -layers merge txt:
# ImageMagick pixel enumeration: 1,1,65535,srgba
0,0: (23.0014%,32.9992%,43.0014%,1) #3AE2547A6E15 srgba(23.0014%,32.9992%,43.0014%,1)
"-compose Add -composite" and "-compose Add -layers merge" give two other results.
F:\web\im>%IM%convert xc:rgba(10%,20%,30%,0.9) xc:rgba(40%,50%,60%,0.1) -poly "1,1 1,1" txt:
# ImageMagick pixel enumeration: 1,1,65535,srgba
0,0: (50.0008%,69.9992%,90.0008%,1) #8000B332E666 srgba(50.0008%,69.9992%,90.0008%,1)
F:\web\im>%IM%convert xc:rgba(10%,20%,30%,0.9) xc:rgba(40%,50%,60%,0.1) -evaluate-sequence Sum txt:
# ImageMagick pixel enumeration: 1,1,65535,srgba
0,0: (50.0008%,69.9992%,90.0008%,0.999985) #8000B332E666FFFE srgba(50.0008%,69.9992%,90.0008%,0.999985)
F:\web\im>%IM%convert xc:rgba(10%,20%,30%,0.9) xc:rgba(40%,50%,60%,0.1) -compose Add -composite txt:
# ImageMagick pixel enumeration: 1,1,65535,srgba
0,0: (13.0007%,22.9999%,33.0007%,0.909987) #21483AE1547BE8F4 srgba(13.0007%,22.9999%,33.0007%,0.909987)
F:\web\im>%IM%convert xc:rgba(10%,20%,30%,0.9) xc:rgba(40%,50%,60%,0.1) -compose Add -layers merge txt:
# ImageMagick pixel enumeration: 1,1,65535,srgba
0,0: (23.0014%,32.9992%,43.0014%,1) #3AE2547A6E15 srgba(23.0014%,32.9992%,43.0014%,1)
snibgo's IM pages: im.snibgo.com