saschiwy/HeicConverter
关于
一个非常简单的命令行工具,用于将 HEIC 文件转换为 JPG
开发工具可以做什么
- Convert all HEIC files to jpg in a folder and sub-folders recursively
- Skips already existing conversions
- Keep Metadata of the original file
- Optional: Remove source files
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文HeicConverter
Introduction
A very simple command line tool to convert *.heic files to jpg. Since the available programs for windows are either paid or not working for me, I decided to make a simple python script to help convert these files.
Features
- Convert all HEIC files to jpg in a folder and sub-folders recursively
- Skips already existing conversions
- Keep Metadata of the original file
- Optional: Remove source files
- Optional: Overwrite existing files
Quick Usage
- Copy the prepared exe to the folder with heic files for convert and double click it.
- Use Command line and append the path of interest:
./heicConverter.exe path/to/pictures
Command Line
Start the script (or exe) from command line for additional options:
heicConverter.exe [-h] [-r] [-o] [--not-recursive] [--skip-prompt] [-q QUALITY] [-t TARGET] [path]
Convert HEIC files to JPEG
positional arguments:
path the path to the file or directory to convert
options:
-h, --help show this help message and exit
-r, --remove Remove converted HEIC Files
-o, --overwrite Overwrite existing JPEG files
--not-recursive Do not search subdirectories
--skip-prompt Skip the prompt at the end
-q QUALITY, --quality QUALITY
Quality of the JPG Files, default: 95
-t TARGET, --target TARGET
The target directory for the converted files if not given, the source directory is used
Example
heicConverter.exe --path <SOURCE/FOLDER> -t <TARGET/FOLDER>
GUI

Installation
UV (Universal Virtualenv)
Install UV (Universal Virtualenv) by running the following command in your terminal:
Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Linux / Mac:
wget -qO- https://astral.sh/uv/install.sh | sh
Windows
Download the latest release from the Release Page and extract it somewhere on your machine.
Linux / Mac
Download the repo, and run the script.
uv run heicConverterGui.py
Development Dependencies
Install the python package dependencies with:
uv sync
Create your own executable
Navigate with a console to the source dir and run the following commands:
uv run python -m PyInstaller --onefile --console heicConverter.py
uv run python -m PyInstaller --onefile --windowed --add-data "lang;lang" --collect-all tkinterdnd2 heicConverterGui.py
--add-data "lang;lang" bundles the translations into the GUI. On Linux or macOS use lang:lang.
Release
Releases are built by the GitHub Actions workflow Draft a new release. Start it under
Actions → Draft a new release → Run workflow and enter the new tag (e.g. v0.5.0).
It runs the tests, builds both Windows executables and creates a draft release, which you then review and publish.
Remarks
The basic software was mainly created by people at StackOverflow: https://stackoverflow.com/questions/54395735/how-to-work-with-heic-image-file-types-in-python
Virus Detection
Some people reported that their virus scanner detected a virus in the exe file. According to this reddit post: Windows Defender found "wacapew.c! ml" the pyinstaller is adding a file which can be detected as virus. I can assure you, I did not add any virus. However, I used external libraries and I cannot guarantee that they are free of viruses. If you are unsure, you can either create a exe yourself (see above) or use the python script directly.
Also, very interesting is, that the console tool has a higher detection rate than the GUI tool. According to another reddit post, the python exe creation uses some similar signature as a virus. My python program is a Trojan?


The number of detections is still very low with 3/72 and 5/72.
If you still have concerns I recommend to not use this software.
Example

Contribution
Thanks to all contributors. Feel free to fork and improve the code.
Donations
Special thanks to people who donated to support the project.
- @oaustegard
- Max Young
探索相关项目
加载中…