Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Crop screenshots to same window area

I had problems getting exact screenshots of some work, and was merely able to get full desktop screenshots. So I needed to crop to just the relevant portion. In my case, I wanted an 800x600 picture, from my second monitor (first being the left monitor, and second being the right monitor), starting at 1920+560 pixels by 240 pixels.

for word in *png ; do convert "${word}" -crop 800x600+2480+240 foo/${word} ; done

Really small, and dumb, but I'll need this again someday.

References

  1. Cropping Images using Command Line Tools Only - Ask Ubuntu

Comments