Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. """This file contains the required functions for the editing features"""
  2.  
  3. import Image
  4.  
  5. import base
  6. import cubes
  7.  
  8. from hypershade.cubescript import playerCS, CSCommand
  9. from hyperserv.servercommands import ServerError
  10.  
  11. @CSCommand("loadimage","trusted")
  12. def loadimage(caller,imagename,s=4,hf=0.1):
  13. s=int(s)
  14. hf=float(hf)
  15. im = Image.open(imagename)
  16. pixels = im.load()
  17. (xsize, ysize) = im.size
  18. for y in xrange(ysize):
  19. base.packetSendingQueue.put((49,))
  20. for x in xrange(xsize):
  21. cubes.makecolumn(caller,x,y,0,int(pixels[x,y]*hf),s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement