Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. from PIL import Image
  4.  
  5. image_handle = Image.open("PATH_TO_IMAGE_GOES_HERE.jpg")
  6. width, height = image_handle.size
  7. pixel_data = image_handle.load()
  8.  
  9. for x in range(width):
  10.     for y in range(height):
  11.         print pixel_data[x, y]
  12.  
  13. image_handle.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement