Automating Image Re-sizing in PS, Batch
kcui
Registered Users Posts: 71 Big grins
I have several large images of various sizes and aspect ratios. I want to place these images on a 1600x900 background. If the aspect ratios are equal to 16:9, then simply transform / reduce the imagge to 1600x900. For those that are not, I want to reduce the height 900px (fit vertically) and have it centered on the background layer. By centering I ensure an equal border on either side of the image (letterboxing, but vertical).
Right now I am manually opening the images as layers, pasting them into a 1600x900 background, the free transforming them to match 900px height. Then I crop to the (now re-sized image), and expand to canvas relative to the image to make a 1600x900 image.
In a nutshell, I am reducing my images with the constraint that they have a 900px height and be centered.
Is there any way to automate this? Obviously I can't record an Action as my sizes vary. Is there a way the program/script this? It obviously requires a little bit of math.
Does anyone know of a better way to do this that doesn't require scripting? It it a bit time consuming at the moment....
Thanks!
BACKSTORY:
You may wonder why I want to do this. For my 16:9 images, my website will display them in a fullscreen mode. However for non 16:9 images it will stretch the width to fit, so I end up with wide images but cropped vertically. I have a letterboxing option which will center these and not crop them, but then my 16:9 images end up with an ugly border on top (when I want them fullscreen on the browser).
Right now I am manually opening the images as layers, pasting them into a 1600x900 background, the free transforming them to match 900px height. Then I crop to the (now re-sized image), and expand to canvas relative to the image to make a 1600x900 image.
In a nutshell, I am reducing my images with the constraint that they have a 900px height and be centered.
Is there any way to automate this? Obviously I can't record an Action as my sizes vary. Is there a way the program/script this? It obviously requires a little bit of math.
Does anyone know of a better way to do this that doesn't require scripting? It it a bit time consuming at the moment....
Thanks!
BACKSTORY:
You may wonder why I want to do this. For my 16:9 images, my website will display them in a fullscreen mode. However for non 16:9 images it will stretch the width to fit, so I end up with wide images but cropped vertically. I have a letterboxing option which will center these and not crop them, but then my 16:9 images end up with an ugly border on top (when I want them fullscreen on the browser).
0
Comments
Chances are, you already know - but just in case.
Select images to be modded
View > image edit window
Tools > Trim / angle adjustment
Aspect ratio > custom ... 16 and 9
Drag marquee over required area > ok (note that you'll end up with 1600 x 900 ... irrespective of the displayed pixel dimensions under the crop tool)
Repeat
Return to main window ... where you'll see your pix with crop marquees
File > batch process ... enter relevant info ... and DPP will dump all your pix @ 1600 x 900 where it's told.
I'd then create a layer in PS of the required size to give an equal width border around said pix
Open modded images, and drag (with shift) each pic onto bg layer.
Or just open modded pic, Increase canvas size as appropriate, with desired colour ... and ok.(probably better from the non-re-naming pov)
There may well be other / better options with later versions of PS (or with mine that I don't know about ) ...but this's how I'd do this with the gear I have available.
pp
Flickr
In image size, if you only change the height to 900px in image size, that is all that is recorded in the action.
There is also the option under file/automate/fit image...
Let me know if this does not work for you, it should be easy enough to do via an action.
Regards,
Stephen Marsh
http://members.ozemail.com.au/~binaryfx/
http://prepression.blogspot.com/
Steve, I will give this a try when I get home. To be honest, I don't have much experience using actions in PS. I may have some misconceptions on exactly how they work. Again, I'll play around some tonight and post an update.
http://kristophercui.com
pp
Flickr
That said, I guess you still need to be careful with them. If I do something like "Select Layer XXXX" it will fail on images that have different layer names.
There are ways around it, just make sure you don't do anything that specifically calls out a layer.
http://kristophercui.com
Author "Color Management for Photographers"
http://www.digitaldog.net/
http://actionlogic.blogspot.com.au/ (Siva's Photoshop Conditional Action - Script for CS2>)
Andrew, would it be possible to provide a screen capture of how the conditional controls are presented, what options etc? I have attached a sample from IRCS.
Stephen Marsh
______
http://members.ozemail.com.au/~binaryfx/
http://prepression.blogspot.com/
Author "Color Management for Photographers"
http://www.digitaldog.net/
Stephen Marsh
http://members.ozemail.com.au/~binaryfx/
http://prepression.blogspot.com/