ImageDepth()

Syntax

Result = ImageDepth(#Image [, Flags])
Description
Returns the depth of the #Image, as it is stored internally by PureBasic.

Parameters

#Image The image to use.
Flags (optional) The kind of depth to return. It can be one of the following values:
  #PB_Image_InternalDepth: Returns the depth of the decoded image (default). Valid return values are:
                                    - 24 (24-bit, 16 millions colors)
                                    - 32 (32-bit, 16 millions colors + 8-bit alpha channel)
  #PB_Image_OriginalDepth: Returns the original depth, as it was before the decoding. Valid return values are:
                                    - 1 (1-bit, 2 colors, monochrome image)
                                    - 4 (4-bit, 16 colors)
                                    - 8 (8-bit, 256 colors)
                                    - 16 (16-bit, 65536 colors)
                                    - 24 (24-bit, 16 millions colors)
                                    - 32 (32-bit, 16 millions colors + 8-bit alpha channel)

Return value

Returns one of the possible depth values described above.

Remarks

When loading an image, PureBasic converts it either in 24-bit or in 32-bit, depending if the source image got an alpha-channel or not. Every image which has a depth less than 24-bit will be internally converted to 24-bit.

See Also

ImageWidth(), ImageHeight()

Supported OS

All

<- GrabImage() - Image Index - ImageFormat() ->