We have created a simple PyAMF example for the ByteArray class in ActionScript which provides methods and properties to optimize reading, writing, and working with binary data. The PyAMF equivalent of this class is also called ByteArray that provides the same basic functionality.
This example demonstrates how to:
- Create a webcam snapshot and capture the BitmapData with Flex
- Wrap the image data with the ByteArray class and send it to a PyAMF remoting gateway
- Use Python to write the JPG/PNG file to disk
- Run a simple webserver for static content that serves the images
- Use Flex to load the JPG and display it in the application