hello guys,
i have 2 images, 1st a png file with transparency and second image jpg .
i wish to put png file over jpg file and achieve the desired output
here are the files
top
www.thesalestore.in/top.png
bottom
www.thesalestore.in/bottom.jpg
output expected
www.thesalestore.in/out.jpg
please help me out guys
i can achieve this result in photoshop
also on website - https://www.imgonline.com.ua/eng/impose ... icture.php
thanks
how to achieve overlay result as shown
-
- Posts: 1
- Joined: 2018-05-27T06:54:01-07:00
- Authentication code: 1152
Re: how to achieve overlay result as shown
The first thing you need to do is make a black and white mask the outside shape of the phone and with cutouts for the top T shape and bottom rectangular part.
You then need to use the mask to cut out the bottom image and then place the modified bottom image over the top image. You may need to do something to maintain the edge shadow/gradiant.
I suggest you create your mask and then come back with the mask, details of your Imagemagick version and operating system.
You then need to use the mask to cut out the bottom image and then place the modified bottom image over the top image. You may need to do something to maintain the edge shadow/gradiant.
I suggest you create your mask and then come back with the mask, details of your Imagemagick version and operating system.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: how to achieve overlay result as shown
A simple composite does most of what you want:
But this doesn't make the background outside the phone transparent. There are some ways of doing that, if you want, but they are complex to handle the anti-aliasing.
Code: Select all
magick bottom.jpg top.png -composite out.png
snibgo's IM pages: im.snibgo.com
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: how to achieve overlay result as shown
Since the overlay "top.png" already has the transparency you need, and both images are the same dimensions, snibgo's suggestion of a simple composite from the command line should do what you want.gadgetkarepro wrote: ↑2018-05-27T07:23:51-07:00i have 2 images, 1st a png file with transparency and second image jpg .
i wish to put png file over jpg file and achieve the desired output
Code: Select all
convert bottom.jpg top.png -composite out.jpg
If you're using IM7, use "magick" instead of "convert". If you want to adjust the quality of the output JPG you can set that with "-quality N", where N is 100 or less, just before the name of the output image.