Tag: actionscript 3

从C返回的ByteArray格式无效

以下是代码段: AS方:( img引用实例) bitmapData = Bitmap(img.content).bitmapData; var pixels:ByteArray = bitmapData.getPixels(bitmapData.rect); pixels.position = 0; var output:ByteArray = new ByteArray(); img_width = bitmapData.width; img_height = bitmapData.height; ////invoke C code by alchemy lomoEncoder.encode(pixels, output, img_width, img_height); var newImage:Image = new Image(); //can’t show the image newImage.source = output; C代码: AS3_Val dest; AS3_Val source; unsigned char* pixels = (unsigned […]