Resize/crop multiple files while preserving certain areas?

1

I have 176 JPEG images that are 450x800 in size, and was wondering if there was a way to essentially resize them, but while preserving their content in certain areas (currently I'm only hoping for the middle). Coincidentally, the size I wish to have is actually the reverse -- 800x450.

I understand that a picture says a thousand words.

I have:

http://i.imgur.com/rYeJuIb.jpg

Obviously what happens with an ordinary re-size:

enter image description here

I would like: enter image description here

Obviously, the white quadrilateral is something more complicated, but it's about the size, and it is white-on-black (I think it has a smooth transition towards black, so magic selection is out of the question.)

What helps immensely is that the background is exactly black everywhere, maybe it's possible to:

  1. Select and crop a quadrilateral figure in the middle.
  2. Make new or resize the background.
  3. Paste cropped object.
  4. Happiness!

Thank you!

Wuuuf

Posted 2014-05-23T17:21:34.140

Reputation: 13

Are you just wanting to crop the top, bottom, and sides? Or actually resize ? – Panther – 2014-05-23T17:31:53.380

See http://www.imagemagick.org/Usage/crop/

– Panther – 2014-05-23T17:34:10.080

1@bodhi.zazen Ahh, snap! It's possible to crop sides of the image too. Here's the command that worked for me: convert *.jpg -bordercolor Black -border 175x0 -shave 0x150 <folder> – Wuuuf – 2014-05-23T17:58:02.403

1@Wuuuf I think you can answer your own questions after a set time limit. You should post that as an answer for your question if it solved the issue. – Darth Android – 2014-05-23T18:13:40.680

@DarthAndroid Well, I granted the accepted answer to bodhi.zazen since it was their idea, and the fact that points matter more for them as I am a guest user :P – Wuuuf – 2014-05-23T18:29:11.990

1@Wuuuf You're just as much a user as any of the rest of us! :) Just hang around and ask good questions, and answer a few too! – Darth Android – 2014-05-23T19:48:22.567

Answers

0

I find the most useful command line tool is convert, part of imagemagick

convert has many options , so much so that I can not recall all of them and have to look them up and then apply the options to the task at hand.

http://www.imagemagick.org/Usage/

In this case,

convert *.jpg -bordercolor Black -border 175x0 -shave 0x150 <folder>

worked for Wuuuf

Panther

Posted 2014-05-23T17:21:34.140

Reputation: 418