Skip to main content

Convert your image url from web or your image field from database to base64

Project description

=== CONVERT IMAGE TO BASE64

IMGTOBASE64 convert your image url from web or your image field from database to base64

Detailed documentation is in the "docs" directory.

Quick start

  1. Install the module:

    pip install imgtobase64

  2. CASE OF IMAGE FROM WEB URL

    from imgtobase64.job import png_to_base64

    web_url = "https://sb.kaleidousercontent.com/67418/800x533/a5ddfb21a6/persons3-nobg.png"

    image_base4 = png_to_base64(web_url)

  3. CASE OF IMAGE FROM FIELD OF A TABLE ON YOUR DB

    `We have a table named Banner with attribute name image and description so : So if we want tranform image to base64 to print blog on pdf,we will do this:

    import imgtobase64

    image_base4 = imgtobase64(banner.image)`

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

imgtobase64-1.1.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imgtobase64-1.1.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file imgtobase64-1.1.1.tar.gz.

File metadata

  • Download URL: imgtobase64-1.1.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.6

File hashes

Hashes for imgtobase64-1.1.1.tar.gz
Algorithm Hash digest
SHA256 71fcbcceb98c8caae0c27e19229e872e8cf9c03d78f3aae67cd15bbc69cdc6f5
MD5 655cd65187fef984d7d2fc06607b20a3
BLAKE2b-256 6745a4a4d2e89fdf54153eb89ebde2518a76e3f06fe743893e2b013739c23c43

See more details on using hashes here.

File details

Details for the file imgtobase64-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: imgtobase64-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.6

File hashes

Hashes for imgtobase64-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af58b30ac066a085f830b897c0fef2eef919f0f0c1063e123f58238a9a47f5c7
MD5 b686cbc92f661c67837eb01c4634fe2f
BLAKE2b-256 f7ce66eba1a05531ba574b2a1b1ae4c398b4a75b29d1f3ef39a15aed7edb2622

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