461665 Function (.NET) to parse pixelmap into an image

I gang Opslået Dec 7, 2010 Betalt ved levering
I gang Betalt ved levering

Need some assistance to do some image processing. We have a SWF file we need to take a snapshot of and email to someone.

We have a flash SWF that takes a screenshot of itself and POSTs it to us via HTTP request. The post data looks like:

&emailTo=address

&imageData=undefined%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F…… (2MB worth of this)

What we need to do is process that imageData string from the request form and turn it into a JPG file saved on the server. From there we can link to it in emails by <img> tag. I think it's some kind of pixel map. The image will always be 490x880 in size.

It sends the POST request to a file (must be in the same folder as the SWF) called ssEmailRefer.aspx. We need a function that will parse the image data, and eventually process it into a JPG image we can save on the server.

Communicate with me on PMB for test link.

We can't change the Flash portion unless it's absolutely necessary, but here is the actionscript that generates the string:

ActionScript code:

function GP():String {

var charCode:Array = new Array();

for (var i = 0; i<256*256; i++) {

[url removed, login to view]([url removed, login to view](i));

}

var bmd:BitmapData = new BitmapData(490, 880, false, 0xffffff);

[url removed, login to view](this);

var string;

var w:Number = [url removed, login to view];

var h:Number = [url removed, login to view];

var i:Number = 0;

var j:Number = w*h;

var mybmd:BitmapData = bmd;

var NB:Number;

var mystring;

var k:Number;

var color:Number;

var B;

var tmp;

var G;

var R;

for (i=0; i<j; i++) {

k = i%w;

color = [url removed, login to view](k, (i-k)/w);

B = color%256;

tmp = (color-B)/256;

G = tmp%256;

R = (tmp-G)/256;

if (i%2 == 0) {

mystring += charCode[R*256+G];

NB = B;

} else {

mystring += charCode[NB*256+R]+charCode[G*256+B];

NB = null;

}

}

if (NB != null) {

mystring += charCode[NB*256];

}

string = mystring;

[url removed, login to view]();

return string;

}

.NET Actionscript Adobe Flash ASP Grafisk design Odd Jobs

Projekt ID: #2207560

Om projektet

Remote projekt Aktiv Jul 11, 2012