Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

I'm looking for the easiest/quickest way to crop the image below to remove the transparent border in Photoshop CS5. Source image available here.

I have lots of these so I'm looking for some consistency where I can batch convert several at the same time. Each image is exactly the same size (with transparent border 512x512 pixels) and the remaining image should be the same size for all them so I can resize the image down to 32x32 pixels whilst retaining square proportions.

Steps I've tried so far

  1. Rectangular Marquee Tool to select as much of the red as possible

  2. Select/Similar

  3. Image/Crop

The problem is that it's a little inconsistent as it either doesn't select properly (see Image1) or it still leaves a small transparent border (see Image2) and so is not always square.

Image1

enter image description here

Can anyone advise a better way to do this which I can run as a batch against lots of similar type images?

Thank you

share|improve this question
    
If you have mac, you should definitely give Slicy a try. - graphicdesign.stackexchange.com/questions/8892/… - Slicy generally saves i.e. contents of a group as an image with no extra padding around the image ( unless you want there to be ). –  Joonas Sep 16 '12 at 19:45
1  
By the way, in your example crop, you are clipping away parts of the shadow. –  Joonas Sep 16 '12 at 19:46
    
@Joonas - Ahh I think that's the problem. There is a shadow which is why the Trim doesn't appear to work properly (it is working but the shadow creates uneven edges after Trim). In that case how is best to get a 32x32 pixel image after a Trim that is centred? If I resize it looks a bit wonky after Trim. –  ooo Sep 16 '12 at 19:55
    
I don't think I get what you mean. Generally though, for icon that size, you should probably drop out the outer shadows all together to efficiently use up the space. But again, as far the cropping/slicing goes, do try out Slicy if you possibly can. –  Joonas Sep 16 '12 at 20:40
2  
There are two problems that I see, the first being the drop shadow, the second being the trim area. Trim normally works, but the drop shadow will be the issue. Do you want the outer drop shadow? Have you tried command+click on the initial vector shape (rounded rectangle) and then create a Layer Mask, apply it to a new folder and then move the original layer inside? This should compensate for the outer drop shadow (as it looks like you're using the drop shadow for the inner drop shadow area). Once you mask off the folder with the shape, you'll be able to use Trim (Transparent) properly. :) –  Kevin Bomberry Sep 16 '12 at 21:20

1 Answer 1

up vote 3 down vote accepted

If you want to automate the process through batch command, then simply apply trim to all the images, and then you can apply canvas re-size command

share|improve this answer
    
I have tried Trim but it doesn't crop evenly so I still get a transparent border that's uneven on each side. It then doesn't resize properly. –  ooo Sep 16 '12 at 19:38
    
Now I have downloaded your sample jpg, and tried doing the following which works perfectly at my end. –  Fahad Sep 17 '12 at 13:54
    
Your right. I didn't realise there was a shadow on the image. Thanks for everyone's help. –  ooo Sep 17 '12 at 13:56
    
Now I have downloaded your sample jpg, and tried doing the following which works perfectly at my end. created new action > created a duplicate of the background layer > select background and delete that > very small selection of an outer white area of the jpg you provided > grow selection from select menu > Invert the color so it will become black > grow selection again > delete the selected area > now trim. –  Fahad Sep 17 '12 at 13:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.