LibraryLink`
LibraryLink`

MImage_convertType (C Function)

is a library callback function that converts type and interleaving of an MImage.

Details

  • Used in C/C++ code in a library function called from the Wolfram Language.
  • Returns an MImage of data type type.
  • Data type type can be one of the MImage_Type_Bit, MImage_Type_Byte, MImage_Type_Bit16, MImage_Type_Real32, or MImage_Type_Real.
  • Interleaved or planar MImage will be returned based on the setting of interleaving.
  • Null will be returned if any of the specified arguments are invalid, or if there is not sufficient memory.

Examples

Basic Examples  (1)

This converts MImage to MImage_Type_Real32 type:

MImage I0, I1;
mbool interleavedQ = libData->MImage_interleavedQ(I0);
...
I1 = libData->MImage_convertType(I0, MImage_Type_Real32, interleavedQ);