how to change image resolution in python code example
Example 1: change image resolution pillow
size = 7016, 4961
im = Image.open("my_image.png")
im_resized = im.resize(size, Image.ANTIALIAS)
im_resized.save("my_image_resized.png", "PNG")
Example 2: get resolution of image python
img = Image.open("test.png")
img = img.size
# img.size is a tuple