Page 1 of 1
Re: MultiplyCompositeOp behaviour
Posted: 2008-07-16T17:19:36-07:00
by anthony
Delete the alpha from both images, before multiplying them.
You can just turn it off with the 'matte' controls.
That hopefully will solve the problem.
Re: MultiplyCompositeOp behaviour
Posted: 2008-11-12T17:50:32-07:00
by anthony
While reviewing...
As a first draft.
test image...
Code: Select all
convert -size 100x100 gradient: \( +clone -rotate 90% \) \
-compose CopyOpacity -composite test.png
this reads the image, 'saves' a backup for later reuse.
then separates the alpha channel, and multiplys ALL the channels.
The save image is then used to restore the original alpha.
Code: Select all
convert test.png -write MPR:save \
\( +clone -alpha extract \) -compose multiply -composite \
MPR:save -compose DstIn -composite \
pre-multiplied.png
NOTE: most of the
Duff-Porter Compose Methods are defined in terms of pre-multiplied pixels, and Im does this internally. You would only need to do pre-multiplication if you were creating a new composition or something like it.
What Are you planning to use it for? It may already be in IM, or can be added to IM relativally easilly.