Code Monkey home page Code Monkey logo

inbac's Introduction

inbac

Description

inbac is an interactive batch cropper made for quick cropping of images.
I made this program because cropping thousands of images with image viewers or image manipulation programs was too slow.

Requirements

After installing above dependencies run poetry install in project directory to install remaining dependencies.

Examples

poetry run inbac /home/user/pictures/
Opens images in /home/user/pictures/ and saves cropped images to /home/user/pictures/crops

poetry run inbac -a 1 1 -r 256 256 /home/user/pictures/ /home/user/crops/
Opens images in /home/user/pictures/ in 1:1 ratio selection mode and saves images resized to 256x256px in /home/user/crops/

Usage

usage: inbac [-h] [-a ASPECT_RATIO ASPECT_RATIO] [-r RESIZE RESIZE]
             [-s SELECTION_BOX_COLOR] [-w WINDOW_SIZE WINDOW_SIZE] [-p]
             [input_dir] [output_dir]

inbac - interactive batch cropper

Left Mouse Button                 - select part of image

Z                                 - save selection and go to the next picture

X                                 - save selection and stay on the same picture

Right Arrow or Right Mouse Button - go to next picture

Left Arrow or Left Mouse Button   - go to previous picture

positional arguments:
  input_dir             input directory (defaults to current working
                        directory)
  output_dir            output directory (defaults to folder crops in input
                        directory)

optional arguments:
  -h, --help            show this help message and exit
  -a ASPECT_RATIO ASPECT_RATIO, --aspect_ratio ASPECT_RATIO ASPECT_RATIO
                        selection should have specified aspect ratio
  -r RESIZE RESIZE, --resize RESIZE RESIZE
                        cropped image will be resized to specified width and
                        height
  -s SELECTION_BOX_COLOR, --selection_box_color SELECTION_BOX_COLOR
                        color of the selection box (default is black)
  -w WINDOW_SIZE WINDOW_SIZE, --window_size WINDOW_SIZE WINDOW_SIZE
                        initial window size (default is 800x600)
  -p, --preload_images  load all images to memory

inbac's People

Contributors

weclaw1 avatar

Watchers

 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.