How to batch convert photos for a specifi target size?
November 7, 2011 9:13 AM   Subscribe

Best solution for this somewhat unique batch photo resizing problem? Photoshop doesn't seem to fit the bill.

There's a visual aid, to help explain the problem.

1. There are hundreds of photos in various sizes an orientations that need to be re-sized for the web.

2. The problem is that all of these photos, with their various sizes and orientations, need to fit inside of a 595 pixel wide by 330 pixel high rectangle for the web. This may sound silly, but it is what it is.

3. When the photos can't fill that specifically sized frame, they'll be surrounded by a black background. See Step 3 of the visual aid for reference.

4. This process needs to preserve or somehow keep the file name.

Summing up, I want to batch convert hundreds of photos of different sizes and orientations to fit inside a specifically size web format. What is the best tool to accomplish this? I have Photoshop CS 3-5(but not 5.5), on both Windows and Mac, am comfortable using the batch processor, but it doesn't seem able to do this.
posted by Brandon Blatcher to Computers & Internet (13 answers total) 6 users marked this as a favorite
 
There's an Automate script under File -> Automate -> Fit image... that will do the first part, fitting inside 595x330. Then you can set the background color to black and set canvas size to 595x330 and it'll extend the canvas in black color. I don't have a bunch of files to try out batch-automating this with, but the individual steps seem to work.
posted by supercres at 9:26 AM on November 7, 2011


I think XnView should be able to handle this. Go to Tools -> Batch Processing -> Transformations, add Canvas Resize, keep aspect ratio and specify background color as black.
posted by sardonista at 9:27 AM on November 7, 2011


Sorry, I should mention-- that's using CS5 on a Mac.
posted by supercres at 9:29 AM on November 7, 2011


Irfanview, yet again, comes up trumps. I've just tested the following and it appears to do what you want.

Start the program, press 'b' or File | Batch to go to Batch Conversion mode. Select the following options:
  • Batch Conversion
  • Output Format - Advanced | Untick all boxes except:
  • Output Format - Advanced | Canvas Size (ticked)
  • Output Format - Advanced | Canvas Size | Settings | Method 2 | Width 595, Height 330, Centre
Select output directory, add files, click Start Batch.
posted by Busy Old Fool at 9:31 AM on November 7, 2011 [3 favorites]


I just did exactly what you need to do with XnView.
posted by davebush at 9:34 AM on November 7, 2011


I have not done this specific thing, but I've done some similar conversions using Graphic Converter's "batch convert."
posted by adamrice at 9:45 AM on November 7, 2011


Imagemagick will do this for you. How to create the resized image is here, batch programming tips for Windows can be found here. It will most likely take some trial and error to get things right but at the end of it you'll have a script you can use any time.
posted by any portmanteau in a storm at 9:48 AM on November 7, 2011


Response by poster: Start the program, press 'b' or File | Batch to go to Batch Conversion mode. Select the following options:

Batch Conversion
Output Format - Advanced | Untick all boxes except:
Output Format - Advanced | Canvas Size (ticked)
Output Format - Advanced | Canvas Size | Settings | Method 2 | Width 595, Height 330, Centre


That doesn't seem to work, it just crops to images to the canvas size. I need to shrink the photos proportionally to fit on that canvas.
posted by Brandon Blatcher at 9:51 AM on November 7, 2011


That doesn't seem to work, it just crops to images to the canvas size. I need to shrink the photos proportionally to fit on that canvas.

I'm terribly sorry, I missed out one setting. You also need to set Output Format - Advanced | Resize | Set New Size to 595 x 330 and ensure that Preserve Aspect Ratio is ticked.
posted by Busy Old Fool at 10:02 AM on November 7, 2011


Response by poster: I'm terribly sorry, I missed out one setting. You also need to set Output Format - Advanced | Resize | Set New Size to 595 x 330 and ensure that Preserve Aspect Ratio is ticked.

OH!

Hours of work was done in a minute flat. THANK YOU!
posted by Brandon Blatcher at 10:16 AM on November 7, 2011


Best answer: Glad to hear it! For the sake of future readers, I'll put all the Irfanview settings in one place:

Start the program, press 'b' or File | Batch to go to Batch Conversion mode. Select the following options:
  • Batch Conversion
  • Output Format - Advanced | Untick all boxes except:
  • Output Format - Advanced | Resize | Set New Size to 595 x 330
  • Output Format - Advanced | Resize | Preserve Aspect Ratio (ticked)
  • Output Format - Advanced | Canvas Size (ticked)
  • Output Format - Advanced | Canvas Size | Settings | Method 2 | Width 595, Height 330, Centre
  • Output Format - Advanced | Canvas Size | Settings | Set Color (to black)
Apologies again for not getting this right the first time.
posted by Busy Old Fool at 10:18 AM on November 7, 2011 [2 favorites]


Another one that I like for simple photo manipulating is Irfanview. It does a lot of good stuff, but the batch process is a little tricky to get the hang of. Make sure you don't overwrite the original images.
posted by gjc at 6:01 AM on November 8, 2011


You could try Sizester, it does batch editing, and I think it preserves the file name, and let's you set exact pixels or maximum pixels. But I think it maintains aspect ratio, so presumably only one of the dimensions would meet your pixel size requirement. Anyway there's a free trial so you could try it.
posted by Dansaman at 12:55 AM on August 17, 2012


« Older Summer-like experiences in London in the winter?   |   Please translate these text messages Newer »
This thread is closed to new comments.