Possible to create Action to dynamically change rectangular pictures to square ones?

C
Posted By
crispy
Aug 28, 2004
Views
752
Replies
3
Status
Closed
I have photographed and prepared digital images of about 10,000 rugs for a client. I edited all the images to have white backgrounds and rectangular dimensions.

See photo 1 in this page:
http://aasg.brinkster.net/binaries/images/questions/photosho p/web/1.htm

Now the client wants to use SQUARE pictures in his website. That means editing 10,000 pictures to look like dimensions of photo 2.

Is there any way to do this automatically in Photoshop (or any other program)? I know PS’s batch program runs most actions. So how would I create such an action?

NOTE: the images are all different sizes! So I can’t just do a resize of canvas and reuse that action. Is there some kind of script that can be written in photoshop?

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

TD
The Doormouse
Aug 28, 2004
crispy wrote:

Is there any way to do this automatically in Photoshop (or any other program)? I know PS’s batch program runs most actions. So how would I create such an action?

I have done an action before for this exact thing.

Select the upper leftmost white pixel, with "contiguous" option checked. Invert the selection.

Now you have the rug selected.

Copy the rug and paste it into a new image.
Resize the new image to a specific height – 250px, for example. Reset the default background and foreground colors on the toolbar (Ctrl-
X).
Increase the canvas size to the dimensions desired.
Select and close the original image – by default, the new image will be selected.

At this point you now have one image, the perfect size and everything.

You can now create an action to save as JPG (or whatever) or simply let the automation take over. The new image will be saved to a folder of your choosing.

Problem solved.

The Doormouse
P.S.: Test this action on a batch of twenty or so test images before trying it on 10,000 … make BACKUPS and expect it to take soem time. Processing 10,000 images isn’t cake. It does takes time, so do it right and TEST FIRST.

P.P.S.: if you are near San Diego, a pizza and soda would be a great "Thank you".


The Doormouse cannot be reached by e-mail without her permission.
C
crispy
Aug 30, 2004
Hi, Thanks for your response. I wish I could buy you a soda or beer but I’m no where near San Diego. I’m in Atlanta.

Are you saying all the steps can be recorded in an action, including the selection of the rug, creation of new image? How would the action what size the particular rug it is working on should be resized to?

Here’s another much simpler solution proposed
here:http://www.experts-exchange.com/Web/Graphics/Photoshop/ Q_21110499.html

What do you think about his idea?

thanks again.

crispy

On Sat, 28 Aug 2004 02:40:11 GMT, The Doormouse
wrote:

crispy wrote:

Is there any way to do this automatically in Photoshop (or any other program)? I know PS’s batch program runs most actions. So how would I create such an action?

I have done an action before for this exact thing.

Select the upper leftmost white pixel, with "contiguous" option checked. Invert the selection.

Now you have the rug selected.

Copy the rug and paste it into a new image.
Resize the new image to a specific height – 250px, for example. Reset the default background and foreground colors on the toolbar (Ctrl-
X).
Increase the canvas size to the dimensions desired.
Select and close the original image – by default, the new image will be selected.

At this point you now have one image, the perfect size and everything.
You can now create an action to save as JPG (or whatever) or simply let the automation take over. The new image will be saved to a folder of your choosing.

Problem solved.

The Doormouse
P.S.: Test this action on a batch of twenty or so test images before trying it on 10,000 … make BACKUPS and expect it to take soem time. Processing 10,000 images isn’t cake. It does takes time, so do it right and TEST FIRST.

P.P.S.: if you are near San Diego, a pizza and soda would be a great "Thank you".
TD
The Doormouse
Aug 30, 2004
crispy wrote:

Hi, Thanks for your response. I wish I could buy you a soda or beer but I’m no where near San Diego. I’m in Atlanta.

Eh, no worries.

Are you saying all the steps can be recorded in an action, including the selection of the rug, creation of new image?

Yes. The action would record the exact coordinates of the point selected – so long as all the rug images have a margin, you’d be okay.

How would the action
what size the particular rug it is working on should be resized to?

Since the cut&paste operation guarantees that your new image will be the exact height of each rug, you can arbitrarily choose an ideal size.

Here’s another much simpler solution proposed
here:http://www.experts-exchange.com/Web/Graphics/Photoshop/ Q_21110499. html

What do you think about his idea?

I would need to subscribe to see it.

Probably he did away with the cut&paste stage, right? The extra step guarentees that the new image is centered.

thanks again.

You are welcome.

The Doormouse


The Doormouse cannot be reached by e-mail without her permission.

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections