Page 1 of 1

append images to panorama repage doesnt extend canvas

Posted: 2012-04-18T23:16:33-07:00
by pash
Hi,

I want to create a panorama with multiple images with a slightly overlap.

So I created a windows batch file to add a shadow to the 4 images:

Code: Select all

convert -page +4+4  %FILENAME%.bmp -matte ( +clone -background black -shadow 40x1+1+1 ) +swap -background none -mosaic -unsharp 1.5x1+0.7+0.02  %FILENAME%.png
After that, I thought repage would extend the virtual canvas for every image by increasing %CENTER% by 100, so every image get shiftet 100px more to the right

Code: Select all

convert  %FILENAME%.png -gravity center -background None  -trim -repage +%CENTER%+0! OFF_%FILENAME%.png
but nothing happens, the resulting image OFF_%FILENAME%.png has the same dimensions as %FILENAME%.png

Re: append images to panorama repage doesnt extend canvas

Posted: 2012-04-19T00:13:48-07:00
by anthony
-repage is used to position images, or remove the position of the images relative to a virtual (make believe) canvas. The + form removes or resets that information. See IM Examples, Page, Repage, and the Virtual Canvas
http://www.imagemagick.org/Usage/basics/#page

-flatten will place images on a 'filled in' version of that virtual canvas (starting at 0 to the size found on the first image)

-mosiac will expand that canvas in positive directions if nessary, but images still needs to be given an appropriate offset.

-layers merge (the new kid on the block) starts with a 'minimal canvas based on the real part of the first image, and extend it as necessary to cover all the images in all directions positive and negative. any existing virtual canvas setting is ignored. You can then remove any negative offset.
http://www.imagemagick.org/Usage/layers/#merge

See... IM examples, Layering Examples
http://www.imagemagick.org/Usage/layers/#layer_examples

In all cases you need to specify the position of images.

Another example of 'overlapping images' in in Photo handling
http://www.imagemagick.org/Usage/photos/#overlap

Note in the last example how we add the transparency to one image only, and the use -repage to position the image on the virtual canavs.

Re: append images to panorama repage doesnt extend canvas

Posted: 2012-04-21T01:42:04-07:00
by pash
Thank you Athony for pushing me in the right direction, finally i used

composite -compose Dst_Over -tile back2.jpg panorama_RIGHT.png panorama_RIGHT.jpg

Re: append images to panorama repage doesnt extend canvas

Posted: 2012-04-22T20:03:52-07:00
by anthony
Well that is one way of doing it, though it does not seem to be exactly what you seemed to be requesting.