Crop an image based on another image dimensions in Photoshop CS6


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?

1/12/2014 4:33:00 PM

  1. Open both files in Photoshop.
  2. Look up the pixel dimensions of the png file with Edit>Image Size and write them down
  3. 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.
  4. 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.
  5. Before you go to your jpg, go to Select>Save Selection and save your selection by naming it "rounded corners".
  6. 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!
  7. 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.
  8. 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.
5/13/2014 9:04:00 AM