: Fit non-transparent part of an image in photoshop I have a bunch of images that I want to re-size to make icons with. I have found these images on Google and they are all 512*512 images
I have a bunch of images that I want to re-size to make icons with.
I have found these images on Google and they are all 512*512 images but the spacing between the actual image (the non transparent part of the image) and the border of the image is not the same for every one of those images.
The thing is that I want to make all of them fit into 70% of the image, while excluding the transparent pixels and allowing semi-transparent pixels (the image shadow) to exceed this 70% limit.
I have tried to trim the image and then re-size it but I don't get the result that I want because the shadow is either truncated or it is included inside of the 75% perimeter.
Here is an image which explains the issue :
Could you please tell me how to proceed ?
More posts by @Moriarity648
2 Comments
Sorted by latest first Latest Oldest Best
Trim all images' shadows
Resize all images to the same size
Make a Master file with:
Desired final size
Desired shadow
Combine the images that you want with the master file so the images will be on the top layer and the shadow layer in the back.
Now all the images will have same size and shadow.
I'll give you a outline of what I would do.
First I would convince my client that this is a bad idea. But given that you probably have that covered; You wouldn't care anyway. People never do, untill they realize that scaling icons is never really a good idea.
Next I would consider something other than PS as this is one of those things where tools like, python, perl or Imagemagick may be better. If this wont do then i would consider photoshop scripting. The outline of the script would look as follows:
Select your transparency:
Save channel.
Run treshold on that.
Read the size of tresholded image:
Load selection.
Fill a new layer.
Querry new layer position plus height and width. No theres no rasy direct way to do this.
Padd with empty pixels where needed and crop.
Be prepared for 10-20% of images where this will fail.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.