Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """This file contains the required functions for the editing features"""
- import Image
- import base
- import cubes
- from hypershade.cubescript import playerCS, CSCommand
- from hyperserv.servercommands import ServerError
- @CSCommand("loadimage","trusted")
- def loadimage(caller,imagename,s=4,hf=0.1):
- s=int(s)
- hf=float(hf)
- im = Image.open(imagename)
- pixels = im.load()
- (xsize, ysize) = im.size
- for y in xrange(ysize):
- base.packetSendingQueue.put((49,)) #send a remip
- for x in xrange(xsize):
- cubes.makecolumn(caller,x,y,0,int(pixels[x,y]*hf),s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement