Photography Asked by Kristaps on July 27, 2021
I have a folder full of landscape and portrait oriented photos of a product (2000) and I need to fit all of them in square canvas. I know I could use Photoshop actions to do it in batch, but I do not know what method could I use in order to do it.
So far I run into problems that some pictures have different size, so I cannot simply change the Image Canvas to a specific size, also I do not know how to deal with the fact that some of the pictures have different orientation then others.
How would it be possible to automate this task using Photography editing software?
I have Photoshop, Picasa etc.
The excellent free product www.irfanview.com will do this fine
It has a batch mode (B key), and the Advanced options button allows you to crop/resize to any aspect size and ratio, with many options regard how this is calculated etc
Answered by TFD on July 27, 2021
With Photoshop you can use Image Processor Pro (link - scroll half way down page) to process images that will resize your photos to a specific size while maintaining aspect ratio. You could run an action to crop (aka - reduce canvas size) but as @Rob said if you do not know where the subject is how can you batch photos and crop them? You may have to do this manually. I do not know if other programs they will achieve what you are looking for but check out Image Processor Pro as it has several good tools for batching photos.
Answered by L84 on July 27, 2021
Here how I do it for my online store
How to prepare picture for magneto: using xnconvert:
Done... ;-)
Answered by user25486 on July 27, 2021
If you are willing to use java, here is code I used to make images square. After this you can easily fit those in fixed size square canvas using photoshop.
BufferedImage image = ImageIO.read(IMAGEPATH);
int w = image.getWidth();
int h = image.getHeight();
BufferedImage square= new BufferedImage(Math.max(w,h),Math.max(w,h),BufferedImage.TYPE_INT_ARGB);
Graphics2D g = (Graphics2D) combined.getGraphics();
g.drawImage(image, (Math.max(w,h)-w+1)/2, (Math.max(w,h)-h+1)/2, null);
// Save as new image
String fileName=image.getName();
ImageIO.write(combined, "PNG", new File(path, fileName.replace("jpg","png")));
Answered by Taz on July 27, 2021
I would separate the landscape and portrait images and create a separate batch file for each group.
All the landscape image horizontal widths would be adjusted to the width needed, then the height would be changed to the same as the width. So if they all need to be 1000px square, then hitting Play should shorten the image width, then the canvas height would be set to 1000px height (adding white space top and bottom).
Then you would batch all the portrait images the same way, but adjusting the image height to 1000px, and the canvas width to 1000px (adding white space left and right).
Answered by Steve on July 27, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP