A simple python program to take an image as input and print and the required cropped image using Pillow library.
This is a simple program in python which aimed at creating a cropped image of the image taken as input. Cropping is an important operation to remove unwanted operations and get the required image.
Requirement: PIL library
PIL is the Python Imaging Library which provides python with the capability to edit images.
Before cropping the image we should know the required dimensions of the image we need.
According to the dimensions, input the pixels you want to crop.
Cropping starts from left and then upper,right, and lower.
Start from the left and upper corner (Left, Upper)=(x-axis, y-axis)
Next, from the right and lower corner (Right, Lower)=(x-axis, y-axis)
The program displays the cropped image.
Submitted by Akshitha Theretupally (Akshitha)
Download packets of source code on Coders Packet