In
viewtopic.php?f=1&t=15416, the OP is trying to add "homebrew" roundedrectangle corners to a thumbnail image. It works except that the thumbnail image is black. Writing intermediate results showed that the image was being correctly resized and the rounded rectangle applied correctly.
Using the logo: image, this is the command:
Code: Select all
convert logo: \
-thumbnail "300x300>" ( +clone -threshold -1 \
-draw "fill black polygon 0,0 0,25 25,0 fill white circle 25,25 25,0" \
( +clone -flip ) -compose Multiply -composite ( +clone -flop ) \
-compose Multiply -composite ) +matte -compose CopyOpacity -composite \
-background transparent -gravity center -extent 300x300 jan_logo.png
When extent has to make an image larger it must be creating the larger background and then compositing the image on top using the gravity or offset. The problem appears to be that it does not force the compose operation to be "Over" and what actually is done is to use whatever was the last -compose setting, in this case CopyOpacity.
The workaround for this example is to add "-compose Over" before the -extent operation.
Is this a bug or an undocumented feature of -extent?
Pete