I have got two images one is a PNG having some part transparent for rounded corners and a curved top. It is used in a slideshow. I have got another image in JPEG format which needs to fit in these dimensions including the transparent edges. Can someone please help in getting this done?
- Open both files in Photoshop.
- Look up the pixel dimensions of the png file with Edit>Image Size and write them down
- Resize your jpeg with the crop tool by entering the pixel dimensions for with and height in the control bar of the crop tool. If the jepg has the same proportion it will only be resized, but if the proportions are differten this way you can crop some of the image to make it the same size and proportions of the png.
- This is a little harder. The easiest way is to ctr+left click (cmd for mac) on the png layer icon. This way you will make a selection of all of the layer content. In this case it will be the outline of your png, including it's rounded corners. Exactly what you need.
- Before you go to your jpg, go to Select>Save Selection and save your selection by naming it "rounded corners".
- Go to your jpeg in Photoshop, go to Select>Load Selection and choose "rounded corners". The selection has the same size as your png, so make sure you got step 3 right!
- Click on the "add layer mask" in the layer window. This way you load the selection as a mask. You will notice that the mask has some black corners in it, this is its way of telling the image where it has to be transparent.
- Now you can save your image. There is one problem: jpeg does not support transparency, it will be shown as opaque white instead. So you can save as jpeg but only if the background of your slideshow is also white. That is why I recommend to save to png with file>save for web for optimum results. This way you can save the transparency too. You can fiddle around with the settings until you are satisfied, I won't go into details here, that would be overkill. Remember to save as psd with file>save as well to keep as a "master file" of the image that contains all the information Photoshop needs, like layers.
It's difficult to answer without seeing an image (can you upload one?), but since you mention round corners, I think your best option is to recreate the original picture in a way that lets you re-use it for future ones.
The easiest way to do it is to use masks. Here's a quick reference on how to add rounded corner masks to any photo in Photoshop. You basically create a
mask using a rounded rectangle using the
Rounded Rectangle Tool. Then save as PSD, and add the new images as layers underneath the mask (it helps if you apply the mask to a folder and drop the images in there).