Skip to main content

Package to convert various formats of raster graphics images in a single line of code

Project description

PyImageExport

Package to convert various formats of raster graphics images in a single line of code.

A good alternative for image conversion, saving in databases, or image transmission.

From main image formats (like PNG and JPEG), to Base64 and BLOB.

Formats

Fully supported formats:

  • Base64

  • BLOB

  • BPM

  • EPS

  • GIF

  • IM

  • JPEG

  • PNG

  • PPM

  • SGI

  • TIFF

  • WEBP

Examples

Import and Instance the class

import PyImageExport
img = PyImageExport()
  1. Convert PNG image to Base64
image = img.export(input_image="./tests/image.png", input_format="png", output_format="base64")
  1. Convert JPEG image to BLOB
image = img.export(input_image="./tests/image.jpeg", input_format="jpeg", output_format="blob")
  1. Convert GIF image to WEBP
image = img.export(input_image="./tests/image.gif", input_format="gif", output_format="webp", output_name="image", output_path="./tests")

Contribute

If you want to propose a new format, please contact me using my social networks below.

Author

Alvaro Azael Rodriguez Rodriguez - (Development Lead) [Gitlab, Twitter]

Licence

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

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

pyimageexport-1.0.0.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

pyimageexport-1.0.0-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

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