Skip to main content

Image to base64 and back.

Project description

Library for converting RGB / Grayscale numpy images from to base64 and back.

Installation

pip install -U image_to_base_64

Conversion

RGB to base 64

base64 = rgb2base64(rgb_image, image_format)

where image format is JPEG, PNG

Grayscale to base 64

base64 = grayscale2base64(grayscale_image)

Base64 to RGB image

rgb_image = base64_to_rgb(base64)

Base64 to Grayscale image

grayscale_image = base64_to_grayscale(base64)

Issues

For some reason I cannot convert RGB image to JPEG representation in base 64 and back without losses. => test only for PNG and not JPEG

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

image2base64-0.0.1.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file image2base64-0.0.1.tar.gz.

File metadata

  • Download URL: image2base64-0.0.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.13

File hashes

Hashes for image2base64-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ae4aa75ee5c005690b3e37ebdb40a33c839d4f0195b9016f6dec9dac7a0ac786
MD5 d968a2281f6160f80adbac3cf12c9cc7
BLAKE2b-256 348ebc16ee0bb77bc277779ec4dd7c4b27e2b788b73e4450da63da7736c558ac

See more details on using hashes here.

Supported by

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