My process is the following...
1) Send image from flash to server
2) Server reads data from flash and sends proper headers for flash to pickup and read back into memory to save to local disk
Currently I am sending a huge pixel string using the following code:
Actionscript Code:
var jpgSource:BitmapData = new BitmapData(IMAGE_VIEWPORT.width, IMAGE_VIEWPORT.height);
jpgSource.draw(viewPort);
var output:String = "";
var col:String = "";
for(var i:Number=0;i<jpgSource.height;i++)
{
for(var j:Number=0;j<jpgSource.width;j++)
{
col = jpgSource.getPixel(j, i).toString(16);
while(col.length < 6)
{
col = "0" + col;
}
output += col;
}
}
Then I process that in C# returning an image object in the header back to flash.
Does anyone have any better suggestions? I haven't done much image manipulation with flash but I feel like this method is not the best route.