Advertisement
Guest User

Untitled

a guest
May 19th, 2018
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. from PIL import Image
  2. import numpy, matplotlib.pyplot
  3.  
  4. image = Image.open("image.png")
  5. pixels = numpy.asarray(image)
  6. print pixels
  7. ####result
  8. [[[255 255 255 255]#<--- 1st bracket
  9. [255 255 255 255]#<--- 2nd bracket
  10. [255 255 255 255]#<--- 3rd bracket
  11. ... #<--- n-nd bracket
  12. [255 255 255 255]
  13. [255 255 255 255]
  14. [255 255 255 255]]
  15.  
  16. [[255 255 255 255]
  17. [255 255 255 255]
  18. [255 255 255 255]
  19. ...
  20. [255 255 255 255]
  21. [255 255 255 255]
  22. [255 255 255 255]]
  23.  
  24. [[255 255 255 255]
  25. [255 255 255 255]
  26. [255 255 255 255]
  27. ...
  28. [255 255 255 255]
  29. [255 255 255 255]
  30. [255 255 255 255]]
  31.  
  32. ...
  33.  
  34. [[255 255 255 255]
  35. [255 255 255 255]
  36. [255 255 255 255]
  37. ...
  38. [255 255 255 255]
  39. [255 255 255 255]
  40. [255 255 255 255]]
  41.  
  42. [[255 255 255 255]
  43. [255 255 255 255]
  44. [255 255 255 255]
  45. ...
  46. [255 255 255 255]
  47. [255 255 255 255]
  48. [255 255 255 255]]
  49.  
  50. [[255 255 255 255]
  51. [255 255 255 255]
  52. [255 255 255 255]
  53. ...
  54. [255 255 255 255]
  55. [255 255 255 255]
  56. [255 255 255 255]]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement