Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travis Conda Version

batchcrop

Crop a batch of images with the same margins. This script wraps the convert command provided by ImageMagic

Contents

Disclaimer

This library is free to use under the MIT license. Any additions are very much appreciated, in terms of suggested functionality, code, documentation, testimonials, word-of-mouth advertisement, etc. Bug reports or feature requests can be filed on GitHub. As always, the code comes with no guarantee. None of the developers can be held responsible for possible mistakes.

Download: .zip file | .tar.gz file.

(c - MIT) T.W.J. de Geus (Tom) | tom@geus.me | www.geus.me | github.com/tdegeus/batchcrop

Getting batchcrop

Using conda

conda install -c conda-forge batchcrop

This will also install all necessary dependencies.

Using PyPi

pip install batchcrop

This will also install the necessary Python modules, but not ImageMagic.

From source

# Download batchcrop
git checkout https://github.com/tdegeus/batchcrop.git
cd batchcrop

# Install
python -m pip install .

This will also install the necessary Python modules, but not ImageMagic.

Usage

The usage is as follows (see batchcrop --help):

batchcrop
    Crop a batch of images with the same margins.

Usage:
    batchcrop [options] <image>...

Arguments:
    The images to crop.

Options:
    -a, --append=<str>
        Append filenames, if empty the input files are overwritten. [default: ]

    --background=<str>
        Apply a background color (e.g. "none" or "white").

    --flatten
        Flatten input images: required for transparent PNG-files.

    --temp-dir=<str>
        Output directory for temporary images (deleted if not specified).

    -v, --verbose
            Print all executed commands.

    -h, --help
        Show help.

    --version
        Show version.

(c-MIT) T.W.J. de Geus | tom@geus.me | www.geus.me | github.com/tdegeus

About

Crop a batch of images with the same margins

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages