Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. def open(path):
  2. new = Image.open(path)
  3. return new
  4.  
  5. def save(img, path):
  6. img.save(path, "jpg")
  7.  
  8. def makenew(a, b):
  9. img = Image.new("RGB", (a, b), "white")
  10. return img
  11.  
  12. def pixels(im, c, d):
  13. height, width = im.size
  14. if c > height or j > width:
  15. return None
  16.  
  17. pix = im.pixels((c, d))
  18. return pix
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement