Giter VIP home page Giter VIP logo

picture-cropper's Introduction

picture-cropper

An App to batch crop pictures in a folder to a specified aspect ratio.

Currently only landscape pictures are supported. (The App should not drastically fail with portrait picutres but results are less than ideal...)

Tested on Windows 10. Windows .exe binaries are avaiable, click on the "Releases" pane on the side of the page.

Licensed under CC BY 4.0 (I am not a lawyer so advise if license is incompatible with upstream projects -- but the general gist is "open source but please provide attribution").

Why? Aren't there tons of these apps already...?

  • There didn't seem to be many standalone apps that just do image cropping to an aspect ratio (usually they're part of multi GB very large image manipulation programs, which is great but I just needed something fast)
  • Needed to automate 16:9 cropping in the centre for a very large number of files (rather than going into Windows Image viewer and doing one-by-one)
  • Wanted something with scripting/CLI support (use the CLIcore.py script with argument options)

How does it work

The cropping is performed via a very simple "algorithm" - essentially for cropping a wider aspect ratio than original, the top and bottom portions of the image are discarded and the crop is centered. The reverse is true if the user wants to crop the image to a narrower aspect ratio compared to the original image. (This means that for now panoramic images are cropped as well...)

Building binaries from scratch

Prerequisites: Python 3.8 (other versions may work), PySimpleGUI, PIL image library, argparse for CLI version.

Pyinstaller is used to build the Windows binaries. It may be possible to build Mac OSX binaries as well with it however this is untested :-)

Use command pyinstaller GUI.spec

Todo

  • portrait image support
  • better UI
  • HiDPI
  • network share support (may already work but untested)

picture-cropper's People

Contributors

justin8428 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.