Read More
Read More
Menu Close

    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

    Start your headless eCommerce
    now.
    Read More
    . . .
    Discuss on Helpdesk

    Leave a Comment

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


    Be the first to comment.

    Back to Top