Guest User

Untitled

a guest
Jul 30th, 2023
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. def setup():
  2. global img, sizemod
  3.  
  4. size(800, 800)
  5. img = loadImage("bird-8014191_1920.jpg") # File name goes here
  6. sizemod = 3
  7.  
  8. def draw():
  9. global img, sizemod
  10.  
  11. x = img.width
  12. y = img.height
  13. imageMode(CENTER)
  14. image(img, mouseX, mouseY, x/sizemod, y/sizemod)
  15.  
  16. def keyPressed():
  17. global sizemod
  18.  
  19. if key == 's':
  20. saveFrame("####.jpg")
  21.  
  22. if key == '[':
  23. if sizemod >1:
  24. sizemod -= 0.1
  25.  
  26. if key == ']':
  27. sizemod += 0.1
  28.  
  29. if key == 'f':
  30. filter(INVERT)
  31.  
Advertisement
Add Comment
Please, Sign In to add comment