cfpdev
asked on
AS Flex 4 PNGEncoder color depth
Hi there
I'm generating a PNG image from a Flex application. Everything works perfect.
I'm looking to adjust a color depth of produced image (still on the Flex side).
The reason for this our module which process the image further can't cope with 16,7 Millions (24 BitsPerPixel) color depth.
Thanks
Rad
I'm generating a PNG image from a Flex application. Everything works perfect.
I'm looking to adjust a color depth of produced image (still on the Flex side).
// Save as image //////////////////////////
private function saveAsImage():void
{
var pngSource:BitmapData = new BitmapData (mychart.width, mychart.height );
pngSource.draw(mychart);
var pngEncoder:PNGEncoder = new mx.graphics.codec.PNGEncoder();
var pngData:ByteArray = pngEncoder.encode(pngSource);
var header:URLRequestHeader = new URLRequestHeader("Content-type", "application/octet-stream");
name=chart.png");
var uRLRequest:URLRequest = new URLRequest(imageExportURL);
uRLRequest.requestHeaders.push(header);
uRLRequest.method = URLRequestMethod.POST;
uRLRequest.data = pngData;
navigateToURL(uRLRequest);
}
The reason for this our module which process the image further can't cope with 16,7 Millions (24 BitsPerPixel) color depth.
Thanks
Rad
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think my links describe the logic how to generate and save 24 BitsPerPixel color depth image(s) using ActionScript
ASKER
not really an answer to my question but a workaround