Page 1 of 1

Compose an image from multiple images

Posted: 2011-02-23T13:33:37-07:00
by jmituzas
I have been trying this for the most of the day and I can not figure this out.

I want to compose a single image with multiple images. Something along the lines of:

Code: Select all

convert -transparent white -size 360x140 label:'this is a test for a url' test1.png
convert -transparent white -size 360x140 label:'this is a test for a spanish url' test2.png
convert -transparent white -size 360x140 label:'this is a test for a text-logo' test3.png

composite test1.png -gravity East -geometry +200-100 / 
composite test2.png -gravity North -geometry +200-100 /
composite test3.png -gravity West -geometry +200-100 -density 350 test.pdf output.pdf


here's what I get composite: no decode delegate for this image format `/' @ error/constitute.c/ReadImage/532.

So question is how do I accomplish this?

Thanks in Advance,
Joe

Re: Compose an image from multiple images

Posted: 2011-02-23T15:11:08-07:00
by Bonzo
This will work Joe just modify it to what you want:

Code: Select all

convert -size 360x140 -background none label:'this is a test for a url' test1.png
convert -size 360x140 -background none label:'this is a test for a spanish url' test2.png
convert -size 360x140 -background none label:'this is a test for a text-logo' test3.png

convert -size 500x500 xc:white test1.png -gravity East -composite test2.png -gravity North -composite test3.png -gravity West -composite -density 350 output.pdf

Re: Compose an image from multiple images

Posted: 2011-02-24T08:02:16-07:00
by jmituzas
Yours worked but not quite.

OK maybe I should start over and fill you in on what I am trying to do exactly.

Ok I have 3 images:
- url test1.png
- spanish url test2.png
- logo test3.png

these 3 images have to be placed into a .pdf that already exists we will call this test.pdf

After all these images are in place it will create a new document called output.pdf.

Your works for creating a pdf w/ just the tests how can I get it to work with an existing .pdf?

Re: Compose an image from multiple images

Posted: 2011-02-24T10:13:04-07:00
by Bonzo

Code: Select all

convert -size 360x140 -background none label:'this is a test for a url' test1.png
convert -size 360x140 -background none label:'this is a test for a spanish url' test2.png
convert -size 360x140 -background none label:'this is a test for a text-logo' test3.png

convert test.pdf test1.png -gravity East -composite test2.png -gravity North -composite test3.png -gravity West -composite -density 350 output.pdf

Re: Compose an image from multiple images

Posted: 2011-02-24T16:01:03-07:00
by anthony
jmituzas wrote:After all these images are in place it will create a new document called output.pdf.

Your works for creating a pdf w/ just the tests how can I get it to work with an existing .pdf?
PDF to PDF is not recommended with Image Magick.

PDF is a vector image (draw lines and text) file format, and Imagemagick is a raster (pixel array) image processor.

See A word about Vector Image formats.
http://www.imagemagick.org/Usage/formats/#vector

Re: Compose an image from multiple images

Posted: 2011-02-28T06:36:16-07:00
by jmituzas
anthony wrote: PDF to PDF is not recommended with Image Magick.

PDF is a vector image (draw lines and text) file format, and Imagemagick is a raster (pixel array) image processor.

See A word about Vector Image formats.
http://www.imagemagick.org/Usage/formats/#vector
So you are telling me this can not be done?

I understand that but, it looks pretty good (-density 350) but can only get it to compose one image.
When I try to add another one to the output of that is when it looses its clarity, well not really looses it color.

So (weather recommended or not), how would I get it to compose all 3 images at the same time? All in different locations onto a single page pdf.

If this can not be done as a pdf can someone help me out with the conversion from .png to a full page pdf?

Thanks in advance,
Joe

Re: Compose an image from multiple images

Posted: 2011-02-28T10:20:40-07:00
by Bonzo
Did you try my second example code ?

Re: Compose an image from multiple images

Posted: 2011-02-28T13:32:17-07:00
by jmituzas
Bonzo wrote:Did you try my second example code ?
It Works!

Just one more thing, how can I make it full page.. its really small.