BLOB stands for Binary Large OBject. A blob is a data type that can store binary data. This is different than most other data types used in databases, such as integers, floating point numbers, characters, and strings, which store letters and numbers. BLOB is a large complex collection of binary data which is stored in Database. Basically BLOB is used to store media files like images, video and audio files. Due to its ability to store multimedia files it takes a huge disk space. Also length of BLOB may go upto 2, 147, 483, 647 characters. BLOB provides fast multimedia transfer.
To get blob file from image :
with open('image_path') as f:
image_blob = f.read()
To read image from blob in Wand :
with Image(blob=image_binary) as img:
\\other code
Input Image :

Code :
# import required libraries from __future__ import print_function # import Image from wand.image module from wand.image import Image # open image using file handeling with open('koala.jpeg') as f: # get blob from image file image_blob = f.read() # read image using wand from blob file with Image(blob = image_binary) as img: # get height of image print('height =', img.height) # get width of image print('width =', img.width) |
Output :
height = 300 width = 400
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
Recommended Posts:
- Wand selective_blur() function in Wand python
- Read Modifiers in Wand Python
- Python - clone() function in wand library
- Object Oriented Programming in Python | Set 1 (Class, Object and Members)
- Object Oriented Programming in Python | Set 2 (Data Hiding and Object Printing)
- Python | Read csv using pandas.read_csv()
- Read latest news using newsapi | Python
- Read JSON file using Python
- Read, Write and Parse JSON using Python
- How to read Emails from Gmail using Gmail API in Python ?
- Python | Visualize missing values (NaN) values using Missingno Library
- Python - Edge extraction using pgmagick library
- Python - Retrieve latest Covid-19 World Data using COVID19Py library
- Draw a happy face using Arcade Library in Python
- Draw a sun using arcade library Python
- Draw an ellipse using Arcade library in Python
- Draw a tree using arcade library in Python
- Display Snowfall using arcade library in Python
- Access metadata of various audio and video file formats using Python - tinytag library
- Linked list using dstructure library in Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

