1

I have a bunch of 1800x1800 pictures. I need to individually put each image onto a 2200x2200 canvas and then save/export it. Is there a way I can batch this?

To further explain, I need to add a 400 pixel white trim to each side of each picture. Right now I'm using gimp and I'm making a new canvas that's 2200x2200 and adding the picture as a layer and then exporting, and then repeating for each one.

Is there a way that I can automate this or do this multiple pictures at once?

1
  • Some batch image processing in GIMP can be done with a plugin called BIMP (Batch Image Manipulation Plugin). Check it out alessandrofrancesconi.it/projects/bimp - I'm not entirely sure of all it's capabilities but worth a look.
    – Billy Kerr
    Commented Aug 10, 2022 at 10:45

2 Answers 2

1

With ImageMagick, as simple as

convert Source.png -bordercolor blue -border 400 Target.png 

if needed you can define different H/V borders:

convert Source.png -bordercolor blue -border 200x100 Target.png 

Depending on IM version, convert can also be magick or magick convert

If you want to update the original images then use

[magick] mogrify -bordercolor blue -border 100 Image.png

This form makes it simple to update several images in one command(*):

[magick] mogrify -bordercolor teal -border 100 Image*.png

(*) One can also use wildcards with [magick] convert but the syntax to generate the proper output name is a bit contrived. But you can also of course make a loop in a shell script instead.

-1

I used Meitu app, which supports batch processing to make photos at the same size.

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.