QPx_GetImporterImageDepth

QPx_GetImporterImageDepth(importerRef; importerRef):error
importerRef Longint Reference to a graphics importer instance
pixelDepth Longint Pixel depth
error Longint Error result

Get the pixel depth of the image associated with an importer

The graphics importer instance is specified by importerRef. If importerRef does not refer to an existing graphics importer instance, the qpx_paramErr error code is returned.

Pixel depth is returned in pixelDepth.

Possible values returned in the pixelDepth parameter are:

qpx_BlackAndWhite 1 Black and white
qpx_FourColors 2 Four colors
qpx_SixteenColors 4 Sixteen colors
qpx_TwoHundredFiftySixColors 8 256 colors
qpx_ThousandsColors 16 Thousands of colors
qpx_MillionColors 24 Million of colors
qpx_MillionColorsPlusAlpha 32 Million of colors plus alpha
qpx_FourGrays 34 Four grays
qpx_SixteenGrays 36 Sixteen grays
qpx_TwoHundredFiftySixGrays 40 256 grays

Example

   // Get pixel depth

C_LONGINT($error)
C_LONGINT($pixelDepth)

C_LONGINT(gQPixImporter)

$error:=QPx_GetImporterImageDepth (gQPixImporter;$pixelDepth)

If ($error#qpx_noErr)
   
      // Handle the error
   
End if