Advertisement
Guest User

Untitled

a guest
Jan 13th, 2020
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. from PIL import Image
  2.  
  3. #Open image with shell input
  4. image=Image.open((input("Bitte den Namen des Bildes eingeben. (z.B. profilepic.png): ")))
  5.  
  6. size=width,height=image.size
  7.  
  8. for i in range(width):
  9. print("//IMAGE COLUMN", i+1)
  10. for j in range(height):
  11.  
  12. #coordinate = i,j
  13. r,g,b=(image.getpixel((i,j))) #Get pixel at coordinate
  14.  
  15. print("leds[",j,"] = CRGB(",r, "," ,g, ",", b, ");") #print pixel colorchange to console
  16. print("FastLED.show();")
  17. print("delay(delaytime);")
  18.  
  19. del image
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement