For a slideshow I want to extend 82 portrait images to landscape so that the image is duplicated as a blurred background, like this:

enter image description here

will be turned into

enter image description here

This is a one-shot-thing that I probably won't need again soon, so I'd need to use some free (or time limited trial) Windows utility for that. (I know that there are ways using Photoshop scripting, but I don't have Photoshop. I do have Corel PhotoPaint, if that's of any use.)

Do you know of any quick and dirty way to achieve this?

  • 1
    You can download a trial of Photoshop, is there any other reason you don't want to use it?
    – Cai
    Commented Apr 8, 2016 at 20:03
  • 1
    GIMP ( gimp.org/downloads ) blur cut move
    – Yorik
    Commented Apr 8, 2016 at 20:07
  • @CAI - hhhmmm.... good point. I've always been a bit scared of PS's complexity and steep learning curve. To create trial account, download, install, figure out how it works and do the job would need to be faster than doing the 82 pics manually in Photodraw... ;-)
    – Thomas
    Commented Apr 8, 2016 at 20:37
  • 1
    Image Magik could certainly do that; look at the blur tool imagemagick.org/Usage/blur and the composite tool imagemagick.org/script/composite.php and finally the imagemagick.org/Usage/crop Commented Apr 9, 2016 at 0:39
  • 1
    Well, Not many people use it, but Photopaint is in fact quite more powerful than Gimp, and you can also do it very easy. The concept is exactly the same as Photoshop. The macro window is Ctrl+F3. support.corel.com/hc/en-us/articles/…
    – Rafael
    Commented Apr 19, 2017 at 16:33

1 Answer 1


@Metasomatism: Your comment lead me to the solution. If you change that to an answer I'll gladly accept it.

The command that does the trick is

for /f "delims=?" %f in ('dir *.jpg /b') do convert -size 1024x768 xc:skyblue "%f" -blur 0x25 -geometry 1024x768 -gravity northwest -composite "%f" -geometry 1024x768 -blur 0x25 -gravity southeast -composite "%f" -geometry 1024x768 -gravity center -composite "new_%f"

The commandline for ImageMagick is essentially this:

convert -size 1024x768 xc:skyblue 
        in.jpg -geometry 1024x768 -blur 0x25 -gravity northwest -composite
        in.jpg -geometry 1024x768 -blur 0x25 -gravity southeast -composite
        in.jpg -geometry 1024x768 -gravity center -composite

which first creates an empy (well, light blue) canvas of the desired size (here 1024x768 as the images will be shown on an XGA beamer). Then the picture in.jpg is added three times: once in the topleft corner being heavily blurred, once more in the lower right hand corner, also blurred, and once in the center, this one unblurred. This yields the desired effect. It also handles panorama pictures, i.e. pics that are in wide landscape mode. Here, the blurred image is added to the top and bottom, whereas normal portrait pics the blurred pics are to the left and right.

  • bash: syntax error near unexpected token `"delims=?"' Am I missing something? Commented Nov 18, 2018 at 11:16
  • @Forkrul Assail: That is a Windows batch-loop, not linux
    – Thomas
    Commented Mar 8, 2019 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.