-rotate fill in triangles

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
19499787

-rotate fill in triangles

Post by 19499787 »

I'm new to imagemagick, took a few hours and a little help to get up and running.

I want to merge the 3 photographs onto a black background.

Using convert and composite everything works as expected.

But going to the next step the two outer images need to be tilted by about 5 degrees outward to ‘matchup correctly’.

Running the –rotate command tilts the image (+ or -) all fine.

EXCEPT the triangles left over by the ‘rotate command’.

How do I convert them to ‘black’, they are currently ‘white’ in a black background.

Command I’m running are as follows.

convert -size 1910x600 xc:none -fill black blank.jpg
convert 20070709110026L.jpg -rotate -5 20070709110026L.jpg
convert 20070709110014R.jpg -rotate 5 20070709110014R.jpg
composite -compose atop -geometry +25+00 20070709110026L.jpg blank.jpg test1.jpg
composite -compose atop -geometry +1285+46 20070709110014R.jpg test1.jpg test1.jpg
composite -compose atop -geometry +695+49 20070709110003M.jpg test1.jpg test1.jpg


Can one of you bright folk point out where I’m going wrong.

This solution follows several examples I've looked at on the web, maybe its not the best, I'm open to suggestions!


Many thanks
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: -rotate fill in triangles

Post by Bonzo »

A quick reply as I have to go; try using -background none for transparent background or -background black for a black background.

Code: Select all

convert 20070709110026L.jpg -background black -rotate -5 20070709110026L.jpg
I have an example similar to what you want to do at http://www.rubblewebs.co.uk/imagemagick ... ground.jpg If you look at the last exec comand you see that you can combine your last 3 lines of code into one.
19499787

Re: -rotate fill in triangles

Post by 19499787 »

Bonzo

Spot on, I must have tried everywhich way except what you quoted.

Many thanks
Post Reply