Skip to main content

Convert format of HEIC image to PNG by using Python.

Project description

HEIC2PNG

Test Release

This is a tool for converting the format of HEIC images to PNG using Python. It now supports quality adjustment and has an option to overwrite existing files, enhancing the flexibility and usability of the tool.

Installation

pip install heic2png

Visit HEIC2PNG on PyPI for more details.

Usage

As a Library

You can use HEIC2PNG in your Python code as shown below:

from heic2png import HEIC2PNG

if __name__ == '__main__':
    heic_img = HEIC2PNG('test.heic', quality=90)  # Specify the quality of the converted image
    heic_img.save()  # The converted image will be saved as `test.png`

Command Line Interface

HEIC2PNG also provides a CLI for easy conversion of HEIC images to PNG. Here are some examples:

Convert a HEIC image to PNG with a specified output path:

heic2png -i test.heic -o test.png -q 90  # -q is used to specify the quality

If you want to keep the original name, use the command below. It will generate test.png for you:

heic2png -i test.heic -q 90

To overwrite an existing PNG file, use the `-w`` flag:

heic2png -i test.heic -o test.png -q 90 -w

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

HEIC2PNG-1.1.4.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

HEIC2PNG-1.1.4-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file HEIC2PNG-1.1.4.tar.gz.

File metadata

  • Download URL: HEIC2PNG-1.1.4.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for HEIC2PNG-1.1.4.tar.gz
Algorithm Hash digest
SHA256 9cc7c8a3351ba7b48d5c088aac9831f3a41d104ee218224fd871d19bb356074e
MD5 5c702e0cb06847298874e0b3d4600f8d
BLAKE2b-256 ef204f8ee989c37c8e143260569448cc4d3447ebc5bf794144e5c9cb0aba9185

See more details on using hashes here.

File details

Details for the file HEIC2PNG-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: HEIC2PNG-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for HEIC2PNG-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7a4b2e0d7ab44d4f9bd501e0a685db7a581321c2dabdb8345f16bdb1c4b70990
MD5 4e2d12264373408ffa4eba1a54e4a0f1
BLAKE2b-256 6cee14d93530c6d2a5fe6664a7a7185b519dfb8b2c9d36bbe11e7e5302d6a4b7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page