TACC / DisplayCluster

a collaborative software environment for large-scale tiled display systems
Other
40 stars 26 forks source link

Feature Request: Python: Dynamic Image Generation Push #15

Closed platinummonkey closed 2 years ago

platinummonkey commented 12 years ago

Perhaps this would fit well with the DesktopStreamer code with a python interface? This could enable live data visualizations for DisplayCluster.

Example code:

# Using PIL
import Image, ImageDraw, cStringIO

# Create PIL canvas
ims = cStringIO.StringIO()
im = Image.new('RGB',fill=0)
draw = ImageDraw.Draw(im)
im.save(ims,'PNG')

# Connect to DisplayCluster and create new Canvas to display ims
dc = pydc.connect(1234)
win = dc.newWindow(x,y,h,w,ims) # display blank canvas

# Draw rectangle and push to canvas by updating image stream.
draw.rectangle((0,0,10,10),fill=128)
im.save(ims,'PNG') # if required: win.update(ims) 
...
# disconnect when finished
win.close()
dc.disconnect()
exit 0
gregjohnson commented 12 years ago

Hey Cody,

This is a great idea, and something we'll put on the roadmap. We're already planning to add network control / manipulation of remote DC instances through Python. This should be a relatively simple extension of that. Thanks again for all your feedback,

Greg