Simply stated, I'm looking for a PNG encoder that will directly convert a RGB/RGBA ByteArray into a PNG file also stored in a ByteArray without making use of the BitmapData class at all. I'm currently working on a ~v4.0 Scaleform Gfx project - which doesn't support any of the Get/SetPixel methods.
AS3 PNG Encoder without BitmapData
72 views Asked by Digital_Utopia At
1
If you're using Scaleform 4.0, then likely your best solution is to bind the
ByteArrayin question to aGFx::Valuein C++, via anExternalInterfacecall. With theGFx::Value, you can useReadByteArray,WriteByteArray, etc.Scaleform 4.0 by default has a PNG reader/writer built in,
Scaleform::Render::PNG::FileReader/FileWriter. These basically just wraplibpngfunctionality. You can useScaleform::MemoryFileto wrap the incoming/outgoing bytes, so they can use this interface.Alternatively, if you'd like to use the
BitmapDataAPI, you could upgrade to the final version of Scaleform, which is available from Autodesk support for free, assuming you have a valid license.