You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Johannes Stefan 6beaa5d0ec clone -> fork 6 months ago
.gitignore Initial commit 7 years ago
LICENSE Initial commit 7 years ago
README.md clone -> fork 6 months ago
cropall.py added changes for scanning 6 months ago

README.md

Custom changes of Johannes

cropall

A small cross-platform python script to make cropping and resizing images fast. Programs like gimp take way too long to start, open an image, crop it, export it. A batch job/script can automate it but everything gets cropped at the same positions. This sits in the middle, automating loading/clicking crop/save/next so your amazing human vision can be used to quickly select what needs to be cropped and not wasted on navigating clunky GUI hierarchies. I'm surprised there aren't others out there, or maybe I didn't spend long enough searching. click2crop looks good but is not free.

This is really a minimal GUI and preview for the following imagemagick command:

convert in.jpg -crop <region> -resize <fit> out.jpg

Forks

  • @rystraum has added a number of features such as rotation and keyboard shortcuts. See #2.

Install

git clone https://github.com/pknowles/cropall.git

This needs...

  • python 2.7 (added to PATH)
    • python-tk
    • python-imaging-tk
  • ImageMagick (added to PATH)
#Ubuntu
sudo apt-get install python python-tk python-imaging-tk imagemagick

#Fedora
sudo yum install python tkinter python-imaging-tk ImageMagick

I've installed and am using Pillow (python-pillow and python-pillow-tk) for this, but it may work with PIL.

Warning: Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL.

Instructions

  1. Run the script (double click if the OS knows to open-with or ./cropall.py).

  2. If there are images in the current working directory, it should start. Otherwise it will ask for a directory.

  3. Click to select the region, scroll to adjust the size, click crop to start imagemagick and load the next image.

There are a few options at the top of the script file itself (I haven't bothered to provide GUI controls for some yet).

Additional

Do whatever you want with it, within GPL3. The usual don't-blame-me-if-it-deletes-your-stuff.