GithubHelp home page GithubHelp logo

dhruvshan / image-rcc Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 87 KB

A Python GUI program to Resize images, Convert to different formats and Compress images. Runs locally and can parse through multiple images and directories in one go.

Python 100.00%

image-rcc's Introduction

Image RCC (Resize, Convert, Compress)

Image RCC (Resize, Convert, Compress) is a python based GUI program to resize, convert formats and compress local images and image directories.

The program asks for an input directory of images and/or subdirectory for images and asks for a single output directory. The program parses through all images and subdirectories of the input directory to look for files matching the ".png", ".jpg", "jpeg", ".gif", ".webp" formats and converts them based on the relevant inputs in the GUI.

For example, if given an input directory of normal_images as follows:

├── normal_images
│   ├── ferrari_images
│   │   ├── ferrari.jpeg
│   │   ├── enzo.gif
│   ├── lamborghini_images
│   │   ├── lambo.png
│   │   ├── ferrurcio.webp

And given an output directory as output_images, the system will automatically RCC on all the images and create subdirectories to follow the structure of normal images. The output could be as follows (assuming we convert everything to ".png" format):

├── output_images
│   ├── ferrari_images
│   │   ├── ferrari.png
│   │   ├── enzo.png
│   ├── lamborghini_images
│   │   ├── lambo.png
│   │   ├── ferrurcio.png

All image names will remain the same.

How to run the program?

  1. Ensure you have Python and pip installed. This program was built on Python version 3.11.1
  2. Clone the repository and enter the directory
  3. Run pip install -r requirements.txt
  4. Run python ImgRCC-GUI.py

What are the inputs that the user can give?

The GUI looks as follows:

GUI Image

The user will have the following inputs to consider:

  • Input Directory

  • Output Directory

  • Target Width (in pixels)

  • Preserve Aspect Ratio:

    • if checked, the program preserves the aspect ratio of the original image based on the provided target width.
    • if unchecked, the program asks you to enter the Target Height of the output image in pixels.

    GUI Image without preserving aspect ratio

  • Compression Quality, set on a slider. The default compression is 85%.

  • Output Format (png, jpeg, webp, gif).

    • Do note that there is no difference between jpeg and jpg formats so please enter "jpeg" to get jpg output images.
    • There is no need to enter a "." before the output format. For example if you want a png output, just enter "png" and not ".png"

Once all details are clarified, users can click on the Resize, Convert, Compress button.

The progress bar will showcase the progress of the conversion and you should receive a success message if everything goes well.

Future work

Some aspects to improve in the future would be to:

  1. Improve GUI UI/UX
  2. Add more image processing techniques (based on feedback)
  3. Miscellaneous Optmisations

image-rcc's People

Contributors

dhruvshan avatar

Stargazers

 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.