Advertisement


Batch fit images into ratio with blurred background


Question

I need to resize a lot of images into a 4:3 ratio with the desired effect.

Is there a way to do this using photoshop actions? (the background can be scaled or two copies moved to the sides, either way works)

The steps to achieve desired result

image credits: https://itunes.apple.com/us/app/id603106194

2015/12/01
1
1
12/1/2015 10:20:00 PM

Accepted Answer

Maybe this isn't the most bulletproof method, but you could do something like this.

Record an Action like this:

  1. Layer > New > Layer from background...
    • ( Hold down alt when clicking so it doesn't ask you anything. Not that it matters, really. )
  2. File > Automate > Fit image.... Give it your desired document width and height ( I used 500x375px ).
  3. Layer > Duplicate layer... - Duplicate: New ( no need to give it a name )
  4. Image > Image size... - Click the chain to unlock aspect ratio. Insert the desired width document width ( I used 500px ).
  5. Select > All
  6. Edit > Copy
  7. File > Close - Close without saving.
  8. Image > Canvas size.... Give it the desired width ( I used 500px )
    • If you want Canvas size to set both width and height: Stop recording the action, undo the last resize, start recording again and apply the canvas size. ( Because fit image sets either the width or height to what ever size you give it, the Action will only record one of those values when you try to resize the canvas, which might not be desirable. )
  9. Edit > Paste
  10. Layer > New > Background from layer
  11. Filter > Blur > Gaussian blur...

Then to run it on bunch of images: File > Scripts > Image processor... and give it your action to run.

...or File > Automate > Batch...


Alternative action that uses copies of the original image, aligns them to fill the document sided and then blurs that ( Slightly different end result and a bit less bulletproof ):

  1. Layer > New > Layer from background...
    • ( Hold down alt when clicking so it doesn't ask you anything. Not that it matters, really. )
  2. File > Automate > Fit image.... Give it your desired document width and height.
  3. Image > Canvas size.... Give it the width, just like before.
    • If you want Canvas size to set both width and height: Stop recording the action, undo the last resize, start recording again and apply the canvas size. ( Because fit image sets either the width or height to what ever size you give it, the Action will only record one of those values when you try to resize the canvas, which might not be desirable. )
  4. Layer > New > Layer via copy - This is for the middle (why not..)
  5. Layer > New > Layer via copy - This is for the left side
  6. Select > All
  7. Layer > Align layers to selection > Left edges
  8. Layer > New > Layer via copy - This is for the right side
  9. Select > All
  10. Layer > Align layers to selection > Right edges
  11. Select > Deselect
  12. Layer > Merge down
  13. Layer > Merge down
  14. Layer > New > Background from layer
  15. Filter > Blur > Gaussian blur...

Both actions can be downloaded here

2015/12/02
1
12/2/2015 11:14:00 AM