I’m creating some image uploader in Flex with client-side image processing. Processing consists of two steps:
1. Resizing (solved)
2. Converting resized image (represented by ByteArray in PNG32 with alpha-channel) to gray-scale PNG with bit-depth = 2 and no color-palette.
Is there any existing library that is capable of second step? Something like libpng for C++, maybe?
Edit:
It seem I stumbled upon rarely encountered problem. However my descision was to create an AS3 class that is capable of converting bitmapData to 2bit grayscale PNG. I used standart PNGEncoder and PNG format specification (which is not so good as I expected) as basis.
I’m creating some image uploader in Flex with client-side image processing. Processing consists of
Share
1) libpng itself.
There’s a tool called Alchemy, which can compile C/C++ sources into swc libraries. Libpng is already ported (it’s in sdk examples).
2) mx.graphics.codec.PNGEncoder
The only disadvantage of this standart class is its speed. It’s really slow.