Code Monkey home page Code Monkey logo

cropall's Introduction

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.

cropall's People

Contributors

pknowles avatar happytetrahedron avatar m2swe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.