Webkul
Services
Technologies Bagisto QloApps
iOS Android SAP BigCommerce Wix
Trusted by
Samsung Intel Toyota Walmart Disney Nokia Nestlé Decathlon
See all customers
Back to Top
DOC

Fetch Image Format From base64 Source Using Python

This article demonstrate how to fetch image format like (jpeg, jpg, png, gif etc.) from base 64 source using python.

To determine image format from base64 source following code will be helpful.

try:
 import cStringIO as StringIO
except ImportError:
 import StringIO
from PIL import Image 

image_stream = StringIO.StringIO(base64_source.decode('base64'))
image = Image.open(image_stream)
filetype = image.format
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home