Return to FunctionReference page
Function
SWFBitmap newSWFBitmap_fromRawImg(unsigned char *raw, SWF!RawImgFmt srcFmt, SWF!BitmapFmt dstFmt, unsigned short width, unsigned short height);
Purpose
- Creates a SWFBitmap from an uncompressed ARGB image already present in memory..
Parameters
unsigned char *raw - Pointer to the raw image in memory
SWF!RawImgFmt srcFmt - Should be SWF_RAWIMG_ARGB
SWF!BitmapFmt dstFmt - Unused, leave as NULL
unsigned short width - Width of the raw image. Used for calculating the length of the raw image buffer in memory.
unsigned short height - Height of the raw image. Used for calculating the length of the raw image buffer in memory.
Returns
- A SWFBitmap on success, NULL on failure.
Language
- C
Ming version
- (unknown). At least 0.4.0 and onwards, possibly earlier versions as well.
Notes
- In the present implementation (0.4.0), the dstFmt argument is unused.
Example
1 SWFBitmap my_bitmap = newSWFBitmap_fromRawImg(image_in_memory, SWF_RAWIMG_ARGB, NULL, image_width, image_height);