vmware-svga/examples/screen-cursor/scripts/img2bytes.py
Micah Dowty 68478eab4b There are many new tests and examples that we wrote internally at VMware,
but couldn't release immediately since they depended on virtual GPU features
which were not yet publicly released in any products.  This checkin moves those
features from our internal repository to the open source repository. Future   
development on these tests and examples will take place directly in the open
source repository.

The primary feature added by this patch is 'Screen Object', a new dynamic
display management extension supported by Workstation 7.0 and Fusion 3.0.
See the README for a quick explanation.
2009-10-21 20:20:49 +00:00

21 lines
324 B
Python
Executable file

#!/usr/bin/env python
#
# Convert an image file to hexadecimal bytes of indexed color data.
#
# -- Micah Dowty <micah@vmware.com>
#
import Image
import sys
im = Image.open(sys.argv[1])
column = 0
for byte in im.getdata():
print "0x%02x, " % byte,
column += 1
if column == 8:
print
column = 0