Giter Site home page Giter Site logo

jordispranger / heic-to-png-converter Goto Github PK

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

Convert HEIC images to PNG format using this efficient Python script. Leveraging the pillow and pillow-heif libraries, it processes multiple images concurrently for faster performance. Simply place your HEIC files in a folder, run the script, and get PNGs in a new png subfolder. Perfect for batch processing on any system with Python.

License: MIT License

Python 100.00%

heic-to-png-converter's Introduction

HEIC-to-PNG-Converter

Convert HEIC images to PNG format using this Python script. Leveraging the pillow and pillow-heif libraries, it processes multiple images concurrently. Simply place your HEIC files in a folder, run the script, and get PNGs in a new png subfolder. Perfect for batch processing on any system with Python.

Prerequisites

Make sure you have Python installed on your system. You can download it from python.org.

You will also need to install the required Python libraries. You can do this using pip:

pip install pillow pillow-heif

Usage

  1. Clone the repository:
git clone https://github.com/JordiSpranger/HEIC-to-PNG-Converter.git
cd heic-to-png-converter
  1. Place your HEIC images in a folder.

  2. Run the script:

python convert_heic_2_png.py
  1. Enter the path to the folder containing HEIC images when prompted.

The script will convert all HEIC images in the specified folder to PNG format and save them in a subfolder named png.

Script Details

The script convert_heic_2_png.py performs the following steps:

1.	Imports necessary libraries.
2.	Creates output folder if it doesn’t exist.
3.	Iterates through all files in the input folder.
4.	Checks if the file is a HEIC image.
5.	Generates the output PNG file path.
6.	Opens the HEIC file using pillow_heif.
7.	Converts HEIC data to a PIL Image.
8.	Saves the PIL Image as a PNG file.
9.	Prints the conversion status for each file.

License

This project is licensed under the MIT License - see the LICENSE file for details.

heic-to-png-converter's People

Contributors

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