Advertisement
Guest User

Untitled

a guest
May 24th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. def returnColors():
  2. |just assigning the variables
  3. img = Image.open(src).load() |
  4. cList = []
  5.  
  6. for o in range(Image.open(src).size[1]): |iterates through the image
  7. for i in range(Image.open(src).size[0]): |appending color data to cList
  8. cList.append(img[i, o]) |
  9.  
  10. lSize = len(cList)
  11.  
  12. print("The source image is equal to", lSize, "px.") |Here's the important bit
  13. print("") |
  14. command=input(''' What would you like to do? You can say:|
  15. |
  16. get all |
  17. get unique |
  18. |
  19. ''') |
  20.  
  21. The source image is equal to 512 px.
  22.  
  23. What would you like to do? You can say...
  24.  
  25. get all
  26. get unique
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement