2 images appended + overlay?

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
zombie1134
Posts: 4
Joined: 2011-05-03T01:53:05-07:00
Authentication code: 8675308

2 images appended + overlay?

Post by zombie1134 »

For any who can help this is greatly appreciated...

I'm looking to join 3 images together, 2 of them side by side (with 10px of padding between the two) and an overlay on top, centered between them.

So far, I've got this:

Image

With this:

Code: Select all

convert /img1.jpg /vs.png /img2.jpg +append -quality 94 '/result.png'
But I'm looking to do this:

Image

And as an added bonus, is there even a way for me to sink both images into a custom, premade frame?

Any help is appreciated! Thanks!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: 2 images appended + overlay?

Post by fmw42 »

Make a transparent background the size of the two images with the space between them. The use a series of composites to place them onto the background. For example

convert -size WidthxHeight xc:none img1 -gravity west -composite \
img2 -gravity east -composite \
vs -gravity center -composite \
resultimage

where WIDTHxHEIGHT is the size you need to hold the two images with the space between them.

Can you post links to your images? If so, we can demonstrate better.

Can you explain about the frame in more detail or show an example?

Note quality for PNG is different from that of jpg. See http://www.imagemagick.org/script/comma ... hp#quality
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: 2 images appended + overlay?

Post by anthony »

Use Image Layering -- much like Fred has already mentioned...


This examples quite a range of techniques you can use (beyond append which is what it starts with)
http://www.imagemagick.org/Usage/layers/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
zombie1134
Posts: 4
Joined: 2011-05-03T01:53:05-07:00
Authentication code: 8675308

Re: 2 images appended + overlay?

Post by zombie1134 »

Hey guys, thanks so much for your responses... trying some of this out now...

As for links to the raw files, here you go:

http://devmedia.movieweb.com/1.jpg

http://devmedia.movieweb.com/2.jpg

http://devmedia.movieweb.com/vs_med.png

I'm creating the frame now as instructed. Stay tuned!
zombie1134
Posts: 4
Joined: 2011-05-03T01:53:05-07:00
Authentication code: 8675308

Re: 2 images appended + overlay?

Post by zombie1134 »

...and I created the transparent frames png here:

http://devmedia.movieweb.com/vs_frames.png
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: 2 images appended + overlay?

Post by fmw42 »

You would be better to put frames around your images first, then composite them as explained above. Putting your images inside the frames is harder, though not impossible, but you need to know exactly where to place them and if they need resizing. See Anthony's page about framing at http://www.imagemagick.org/Usage/thumbnails/#framing. Also see my script, picframe, at the link below
zombie1134
Posts: 4
Joined: 2011-05-03T01:53:05-07:00
Authentication code: 8675308

Re: 2 images appended + overlay?

Post by zombie1134 »

Got it! Thanks guys... this layering effect works like a charm!

Thanks again!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: 2 images appended + overlay?

Post by fmw42 »

zombie1134 wrote:Got it! Thanks guys... this layering effect works like a charm!

Thanks again!

Post your result and command line(s), if you don't mind. I would be interested in seeing your solution (esp. for adding the border/frame effect) and others could benefit.
Post Reply