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

  1. unsigned char *raw - Pointer to the raw image in memory

  2. SWF!RawImgFmt srcFmt - Should be SWF_RAWIMG_ARGB

  3. SWF!BitmapFmt dstFmt - Unused, leave as NULL

  4. unsigned short width - Width of the raw image. Used for calculating the length of the raw image buffer in memory.

  5. 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);