Search code examples
imagemagickmogrify

Extent not working for imagemagick6 mogrify


Linux Mint comes with imagemagick 6 ( Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 ) and I'm using mogrify to edit some pictures.

I have a bunch of pictures that are 700*1000 and I need to add whitespace to either end to make them 768x1000 so I use this command

mogrify *.jpg -gravity center -extent 768x1000

But the pic stays 700x1000, try the same with convert on a single picture and this works fine. Does extent not work with mogrify?


Solution

  • Searching the web I found the Imagemagick mogrify page and it says extent is supported in version 7.

    Looking at the examples on the page I would try

    mogrify gravity center -extent 768x1000 *.jpg
    

    You should also add more details to the version number as version 6 covered a lot of years and had a lot of releases. Also extent may not have always been supported in V6 mogrify.