Automatically extract specific rectangle of an image

1

I have like 50 screenshots from which I want to extract an rectangle, e.g. the one going from coordinates 100/100 to coordinates 400/400. How can I do that automatically? I mainly use Windows 10. Thanks for any hint on this!

stefan.at.wpf

Posted 2017-01-11T18:18:39.910

Reputation: 1 301

When you say "extract" do you mean to copy that specific portion of the image into a new image? – music2myear – 2017-01-11T18:22:53.247

If so, I believe IrfanView does this. – music2myear – 2017-01-11T18:23:16.033

Answers

1

Try using the Batch Conversion tool in IrfanView: http://www.irfanview.com/

Once you've installed the program and opened it, go to File > Batch Conversion/Rename.

Tick the checkbox Use advanced options... and then click Advanced.

Use the Crop section to set your parameters. They'll probably be X and Y positions of 100, and then width and height both set to 300 (which should take you to 400,400).

Press OK.

Now add the files you wish to process and choose your settings for naming, saving, etc, and then click Start Batch to process the files.

music2myear

Posted 2017-01-11T18:18:39.910

Reputation: 34 957

0

I ended up using Imagemagick

magick mogrify -crop 640x480+50+100 *.png

where 50 and 100 = x and y offset; 640x480 = size of rectangle.

Thanks to the other replies!

stefan.at.wpf

Posted 2017-01-11T18:18:39.910

Reputation: 1 301