Skip to content

This repository contains a Python script, heic_to_jpeg.py, designed to convert HEIC files to JPEG format. The script utilizes the Pillow and pillow-heif packages for efficient image processing.

Notifications You must be signed in to change notification settings

nick8592/HEIC-to-JPEG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

HEIC to JPEG Converter

Introduction

This Python script, heic_to_jpeg.py, is designed to convert HEIC (High-Efficiency Image Format) files to JPEG format. Before using the script, ensure that you have installed the required packages using pip.

Prerequisites

  1. Install Pillow and pillow-heif package:

    pip install Pillow pillow-heif

Usage

  1. Download the Script:

    Download the heic_to_jpeg.py script to your local machine.

  2. Edit the Script:

    Open the script in a text editor of your choice. Replace the folder_dir variable with the path to the folder containing your HEIC files.

    # Replace 'your_custom_folder_path' with the actual path to your folder containing HEIC files
    folder_dir = 'your_custom_folder_path'
  3. Run the Script:

    Open a terminal and navigate to the directory where the script is located. Run the following command:

    python heic_to_jpeg.py
  4. Optional: Keep Original HEIC Files:

    By default, the script will remove the original .heic file after successfully converting it to JPEG. If you want to retain the original .heic files, follow these steps:

    • Locate the following line in the script:

      os.remove(input_file)
    • Comment out the line by adding a # at the beginning:

      # os.remove(input_file)

    This change will keep the original .heic file in the specified folder.

Important Note

  • The script will overwrite existing JPEG files with the same name in the specified folder.
  • Ensure that you have a backup of your HEIC files before running the script, especially if you choose to remove the original .heic files.

Feel free to reach out if you encounter any issues or have questions about using the heic_to_jpeg.py script.

About

This repository contains a Python script, heic_to_jpeg.py, designed to convert HEIC files to JPEG format. The script utilizes the Pillow and pillow-heif packages for efficient image processing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages