pip install pillow
python
from PIL import Image
python
image = Image.open("image.jpg")
python
resized_image = image.resize((300, int(300 * image.height / image.width)))
python
cropped_image = image.crop((0, 0, 200, 200))
python
rotated_image = image.rotate(-90)
python
resized_image.save("output.jpg")
python
from PIL import Image
image = Image.open("image.jpg")
resized_image = image.resize((300, int(300 * image.height / image.width)))
cropped_image = image.crop((0, 0, 200, 200))
rotated_image = image.rotate(-90)
resized_image.save("output.jpg")