So, I have a bunch of files that I use as the basis for my wallpapers. Using ImageMagick, I can convert then using:

convert \
    -resize '1920x1080>' \
    -extent 1920x1080 \
    -background '#000000' \
    -gravity SouthEast \
    $file $dir/$file

So that the image is moved to the lower right area of the screen. This area has little or no windows thus I can actually see the wallpapper. The reason I do this is that some of the images are bigger than my monitor and thus need rescaling instead of just putting there. However, using GraphicMagick with the above command, results in the image being moved towards the upper right corner!

How can I achieve a similar effect with GraphicMagick?

For an example, this is one of the post processed images: enter image description here


1 Answer 1


extent must be used after background and gravity, e.g.:

gm convert -resize '1920x1080>' -background black -gravity SouthEast -extent 1920x1080 infile outfile


gm convert infile -resize '1920x1080>' -background black -gravity SouthEast -extent 1920x1080 outfile

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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