Not tested, but perhaps a lead to follow:
composite -compose atop -geometry 150x150+13+17 \
rose-0.jpg -rotate 45 -transparent-color white \
rose.jpg \
overlay3.jpg
composite -compose atop -geometry 150x150+13+17 \
rose-0.jpg -rotate 45 -transparent-color transparent \
rose.jpg \
overlay3.jpg
Sources:
http://www.imagemagick.org/script/comma ... php#rotate
indicates background color can be set to take care of the corners.
Composite has a "-transparent-color" option.
identify -list color
shows named color definitions as shipped with ImageMagick.
white = rgb(255,255,255)
Identified as an 8-bit/channel triplet.
transparent = rgba(0,0,0,1)
Uses alpha (aka matte, mask) channel
How to rotate and overlay
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How to rotate and overlay
Actually if you had read IM Examples, set "-matte -background none" before the rotate!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/