extrude.png (with opacity) and rect.png (without opacity)
Code: Select all
composite -compose Dst_Out -alpha Set extrude.png rect.png result.png
How to get result with a green inner frame?
Code: Select all
composite -compose Dst_Out -alpha Set extrude.png rect.png result.png
Code: Select all
convert rect.png \
\( -clone 0 -fill green1 -colorize 100% \) \
\( extrude.png -alpha extract -auto-level -write show: \) \
-compose over -composite \
-fuzz 30% \
-fill none -draw "matte 2,2 floodfill" \
-rotate 90 -fill none -draw "matte 2,2 floodfill" \
-rotate 90 -fill none -draw "matte 2,2 floodfill" \
-rotate 90 -fill none -draw "matte 2,2 floodfill" \
-rotate 90 result.png
fmw42 wrote:try this as one way to do it.
(unix syntax)
Please always provide your IM version and platform, since syntax differs on Unix and Windows.Code: Select all
convert rect.png \ \( -clone 0 -fill green1 -colorize 100% \) \ \( extrude.png -alpha extract -auto-level -write show: \) \ -compose over -composite \ -fuzz 30% \ -fill none -draw "matte 2,2 floodfill" \ -rotate 90 -fill none -draw "matte 2,2 floodfill" \ -rotate 90 -fill none -draw "matte 2,2 floodfill" \ -rotate 90 -fill none -draw "matte 2,2 floodfill" \ -rotate 90 result.png
Code: Select all
convert rect.png \
\( -clone 0 -fill green1 -colorize 100% \) \
\( extrude.png -alpha extract -auto-level \) \
-compose over -composite \
-fuzz 60% \
-fill none -draw "matte 2,2 floodfill" \
-rotate 90 -fill none -draw "matte 2,2 floodfill" \
-rotate 90 -fill none -draw "matte 2,2 floodfill" \
-rotate 90 -fill none -draw "matte 2,2 floodfill" \
-rotate 90 result.png
Code: Select all
convert rect.png \
\( -clone 0 -fill green1 -colorize 100% \) \
\( extrude.png -alpha extract -auto-level \) \
\( -clone 2 -fuzz 60% -fill black \
-rotate 90 -draw "color 2,2 floodfill" \
-rotate 90 -draw "color 2,2 floodfill" \
-rotate 90 -draw "color 2,2 floodfill" \
-rotate 90 -draw "color 2,2 floodfill" \) \
\( -clone 2 -clone 3 -compose difference -composite -negate \) \
-delete 2 \
\( -clone 0-2 -compose over -composite \) \
-delete 0-2 +swap \
-alpha off -compose copy_opacity -composite \
result.png