LibraryLink`
LibraryLink`

MImage_getDataType

gets the data type of an MImage.

Details and OptionsDetails
  • Used in C/C++ code in a library function called from Mathematica.
  • Returns one of MImage_Type_Bit, MImage_Type_Byte, MImage_Type_Bit16, MImage_Type_Real32, or MImage_Type_Real.
  • If the input MImage is invalid, MImage_Type_Undef is returned.
  • Examples

    Basic Examples  (1)

    This checks that this is a byte MImage:

    MImage I0;
    imagedata_t type;
    ...
    type = libData->MImage_getDataType(I0);
    if (type != MImage_Type_Byte) {
    processError();
    }

    Tutorials