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
Metadata
Release files for base64-to-image 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| base64_to_image-0.0.1.tar.gz | 6.0 kB | Details |
Release files / base64_to_image-0.0.1.tar.gz
| Download URL | base64_to_image-0.0.1.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc8e3249a692e357aca115f92b735956f2ab66dafb08971b6ee80dc9ab2eca8f
|
|
BLAKE2b-256 checksum How to use checksums |
e556eeb788e9e7ebef06c2b377e231347a5606c4293ab04e62f1b5f0aab5977d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.13
|