Advertisement
naren_paste

Image_Size

Sep 26th, 2023
706
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | Source Code | 0 0
  1. from PIL import Image
  2. # Open an image
  3. image = Image.open("your_image.jpg")
  4.  
  5. # Get the size (width and height) of the image
  6. width, height = image.size
  7.  
  8. print(f"Width: {width}, Height: {height}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement