Giter Club home page Giter Club logo

batchimageprocessing's Introduction

Image Converter and Padder

This is a Python script that converts and pads the images in a specified directory to a common aspect ratio and compresses them to jpg format. It uses the Pillow library for image manipulation and the Tkinter library for creating a graphical user interface.

Used Versions

  • Python 3.10
  • Pillow 10.0

Alt text

Usage

  • Run the script using python image_converter_and_padder.py
  • A window will appear with some options to configure the conversion process.
  • Select the source directory where the images are located by clicking on the "Select source" button.
  • Select the destination directory where the converted images will be saved by clicking on the "Select destination" button.
  • Choose one of the common aspect ratios from the drop-down menu labeled "Aspect ratio".
  • Enter the jpg quality in the range of 0 to 100 in the entry box labeled "Quality".
  • Enter the padding color in hexadecimal format (e.g. "#FFFFFF" for white) in the entry box labeled "Color".
  • Click on the "Convert" button to start the conversion process.
  • A text box will show a message when the conversion process is completed.
  • The script will convert and pad all the images in the source directory that have one of these extensions: ".jpg", ".tga", ".png", ".jpeg".
  • The script will copy any ".gif" files without modifying them.
  • The script will save the converted images as ".jpg" files in the destination directory with the same file name as the original image.
  • The script will use multithreading to speed up the conversion process. The maximum number of threads is set to 10 by default, but you can change it by modifying the max_threads variable in the code.

batchimageprocessing's People

Contributors

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