Skip to content

TheEmilz/heic-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HEIC Converter

Docker Node.js

Easily convert HEIC images to JPEG or PNG using a simple Dockerized Node.js application.


📑 Table of Contents


🚀 Features

  • Batch conversion: Converts all .heic files in the input folder
  • Format selection: Output as JPEG (with quality) or PNG
  • Easy to use: Just copy your files and run a single command
  • Containerized: No need to install dependencies on your system

📦 Requirements


🛠️ Setup & Usage

1. Prepare your folders

  • Place the .heic files you want to convert in the input/ folder (in the project root)
  • Ensure the output/ folder is empty or ready to receive converted files

2. Build & run the container

Build and start conversion:

docker-compose up --build

Start conversion (without rebuilding):

docker-compose up

Run conversion once and stop the container:

docker-compose run --rm heic-converter

Pass custom parameters (e.g., PNG and quality 80):

docker-compose run --rm -e FORMAT=PNG -e QUALITY=80 heic-converter

Change input/output folders:

docker-compose run --rm -e INPUT_DIR=/app/myinput -e OUTPUT_DIR=/app/myoutput heic-converter

⚙️ Environment Variables

Variable Description Default
FORMAT Output format: 'JPEG' or 'PNG' 'JPEG'
QUALITY JPEG quality (1-100, JPEG only) 90
INPUT_DIR Input folder inside container /app/input
OUTPUT_DIR Output folder inside container /app/output

📂 Folder Structure

heic-converter/
├── docker-compose.yaml
├── dockerfile
├── package.json
├── README.md
├── input/         # Place your .heic files here
├── output/        # Converted files will appear here
└── heic-converter/
    └── src/
        ├── index.js
        └── heic-converter.js

📝 Example

  1. Copy your .heic files into input/
  2. Run:
    docker-compose run --rm heic-converter
  3. Find the converted files in output/

❓ FAQ

Where are my files?
  • Input: input/ (host) → /app/input (container)
  • Output: output/ (host) ← /app/output (container)
Can I convert PNG?

Yes, set FORMAT=PNG as an environment variable.

How do I set quality?

Use QUALITY=XX (only for JPEG).


🧑‍💻 Author

  • Made with ❤️ by Emilz

📄 License

MIT License

About

Heic images to JPEG or PNG converter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published