Skip to main content

Demo project

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

    import imgtobase64

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

    image_base4 = imgtobase64(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-0.0.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

imgtobase64-0.0.1-py3-none-any.whl (2.6 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