Giter VIP home page Giter VIP logo

image-cropper's Introduction

PyImageCropper

A simple program to bulk crop images automatically. Using python3, tkinter and Pillow for the image manipulation

How it works

Click on Select to bulk select images you want to crop. Enter the coordinates of the area you wish you crop. Click Crop

PyImageCropper UI Window

File Explorer Window

and voila!

Elden Ring Screenshot 1 Elden Ring Screenshot 2

Installation Instructions

  1. clone the repo with:
    git clone https://github.com/BanAaron/image-cropper.git
  2. cd into image-cropper directory:
    cd image-cropper
  3. create a virtual environment
    python -m venv venv
  4. activate the virtual environment:
    .\venv\Scripts\activate
  5. install the requirements:
    pip install -r requirements.txt
  6. run with:
    python main.py

<<<<<<:>~

image-cropper's People

Contributors

banaaron avatar dependabot[bot] avatar

Stargazers

Marc avatar Lai Alexander Holmsen avatar

Watchers

James Cloos avatar  avatar

image-cropper's Issues

Not able to run the Program

Hi,
I would love to use your Code because I need to resize over 300 images and all need to be resized the same.

Sadly I am not able to run the Program, probably I haven't installed everything right, since I am not very skilled with python or coding in general.

Maybe you can give me some pointers how to fix the issue.

My Terminal gives the following Output when I press the Crop button in the GUI after selecting an image.

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2288.0_x64__qbz5n2kfra8p0\Lib\tkinter\__init__.py", line 1967, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\Marc\Downloads\image-cropper-main\image-cropper-main\main.py", line 103, in button_crop_func
    self.image_handler.crop_images(
  File "C:\Users\Marc\Downloads\image-cropper-main\image-cropper-main\logic.py", line 52, in crop_images
    im.save(f"output\\{base_name}")
  File "C:\Users\Marc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\PIL\Image.py", line 2436, in save
    fp = builtins.open(filename, "w+b")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'output\\examplepicture.jpg'

I am on Win11 btw.

Thanks in advance

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.