Script to Trim and Resize Images of Different Size

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

pistolpete
Posts: 1
Joined: Tue Oct 03, 2017 4:05 pm

Script to Trim and Resize Images of Different Size

Post by pistolpete »

Hi all,

I am trying to come up with a script that will do the following. All files are pngs with a transparent background in a single folder.

1. I want the script to run a batch on all images in the folder. The first step will trim the image so it will crop the image from the top left pixel color.

2. From there I want to resize the image to a 1:1 ratio matching the smaller dimension to the largest dimension (this could be the width, this could be the height depending on the image).

3. Save the resulting image in folder 2.

Is this possible where the dimensions from image to image vary? If you need more info let me know and I can try to provide.
User avatar
txuku
Posts: 136
Joined: Thu Jan 01, 1970 12:00 am

Re: Script to Trim and Resize Images of Different Size

Post by txuku »

Bonjour

What do you mean by "cropping the image of the color of the upper left pixel" ?


Why not "From the top left corner"?

:)