Read modifier refers to immediately modify input image or file format after reading or to make the image perfect to manipulate just after reading the image. This can be done by using the filename parameter of Image() function.
For instance, let us say we want to read an image of (100 x 100) dimensions/aspect ratio but the original image is of (200 X 200) dimensions/aspect ratio. So we can use Read modifier in order to convert image to (100 X 100) dimensions/aspect ratio just after reading it.
We can use read modifiers to display specific frames from the .gif file. Also to select specific pages from pdf files
Types of Read Modifiers:
- Read frames/pages
- Read Resize
- Read Crop
Syntax: with Image(filename=’filename.format[read_modifier]’) as modified_Read:
Example 1: Let us say we need to read only the first page from pdf and convert it in .png format.
Example 3: In this we will perform Read Resize.
Example 4: In this we will perform Read Crop and then save it in another format.
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.
- Python - Read blob object in python using wand library
- Wand selective_blur() function in Wand python
- Access Modifiers in Python : Public, Private and Protected
- Wand image - Baseimage.kuwahara() function in Python
- Wand image.emboss in Python
- Wand image.edge function in Python
- Wand image.despeckle() in Python
- Wand gaussian_blur() function in Python
- Wand transform() function in Python
- Wand crop() function in Python
- Wand save() method in Python
- Wand rotational_blur() function in Python
- Python - Adaptive Blur in Wand
- Wand - blur() function in Python
- Python - Image() function in Wand
- Python - clone() function in wand library
- Python - motion_blur() in Wand
- Python - shade() function in Wand
- Python - sharpen() function in Wand
- Wand adaptive_sharpen() function 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 email@example.com. 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.