0

I have about 400 images that are the same size, but the actual image content is centered against a white border. This looks odd when I display some of them in a list because the left hand border size varies against the image content.

I'd like to basically remove the left hand border but keep the image size, and fill the right hand side with white. Thanks

Steven Sproat
  • 4,398
  • 4
  • 27
  • 40
  • You could try something [like this](http://stackoverflow.com/questions/11779455/how-to-auto-crop-an-image/11784485#11784485). – Bill Dec 13 '12 at 20:17

1 Answers1

1

I would add a white border to your whole image and use -trim which will remove the border and the white L/H border. Then use an -extent with a -gravity west and a -background white to add the border to the RH side.

Something like:

convert input.jpg -bordercolor White -border 2x2 -trim +repage -background white -gravity west -extent 500x800 output.png

Where 500x800 is the final size of your image.

Bonzo
  • 5,169
  • 1
  • 19
  • 27