Page 1 of 1
Problem using -composite operator in 6.2.9.5
Posted: 2006-09-20T07:48:41-07:00
by magick
John Green says: I run IM under Gentoo Linux. With IM 6.2.8.0, the following worked as
required.
Code: Select all
convert \
\( -size 75x60 xc:yellow \) \
\( -size 63x60 xc:blue \) \
\( -size 63x60 xc:black -fill white -draw \
'ellipse 30,32 30,24 0,360' -blur 2x2 +matte \) \
-geometry +7+1 -composite image.png
Under 6.2.9.5, the infilled blue area has the wrong shape.
Should this sequence still work?
Thanks,
John Green
Posted: 2006-09-20T08:06:03-07:00
by magick
Anthony discovered a bug in the clipping algorithm and the patch requires a slight change in your command line to apply the composite clip mask properly. Try this:
- convert \
\( -size 75x60 xc:yellow \) \
\( -size 63x60 xc:blue \) \
\( -size 75x60 xc:black -fill white -draw \
'translate 7,1 ellipse 30,32 30,24 0,360' -blur 2x2 +matte \) \
-geometry +7+1 -composite image.png
to get the same results as ImageMagick 6.2.8.0. This may only work properly with the very latest 6.2.9-7 Beta available tommorrow. 6.2.9-7 will be released within a week or two.
Posted: 2006-09-20T23:53:05-07:00
by anthony
The problem is not so much a bug, but a fact.
The mask is definae relative to the background or destination image.
Also geometry offsets only defines the position of the source or overlay image, it does not effect the mask, and SHOULD NOT CHANGE.
Think of the mask as defining what parts of the destination is in the 'background'
the overlay that is masked is in front of the background, but behind the foreground parts of the destination.
In your case you want the mask to be relative to the source or overlay image, not te background. Currently their is no way of specifing this, other than by adjusting things yourself.
For details see IM Examples, Composite Masking.
http://www.cit.gu.edu.au/~anthony/graph ... pose/#mask