DrawingBufferPixelFormat()
Syntax
Result = DrawingBufferPixelFormat()Description
Returns the pixel format of the current output. It can be a combination (with bitwise or) of the following values:#PB_PixelFormat_8Bits ; 1 bytes per pixel, palletised #PB_PixelFormat_15Bits ; 2 bytes per pixel #PB_PixelFormat_16Bits ; 2 bytes per pixel #PB_PixelFormat_24Bits_RGB ; 3 bytes per pixel (RRGGBB) #PB_PixelFormat_24Bits_BGR ; 3 bytes per pixel (BBGGRR) #PB_PixelFormat_32Bits_RGB ; 4 bytes per pixel (RRGGBB) #PB_PixelFormat_32Bits_BGR ; 4 bytes per pixel (BBGGRR) #PB_PixelFormat_ReversedY ; The Y-Coordinate of the output is reversed in memory (the bottom row is stored first).
Important: DrawingBuffer() must be called before using this function.
The following examples show how to handle the result:If DrawingBufferPixelFormat() = #PB_PixelFormat_32Bits_RGB|#PB_PixelFormat_ReversedY ; 32bit RGB with reversed Y coordinate EndIf If DrawingBufferPixelFormat() = #PB_PixelFormat_32Bits_RGB ; 32bit RGB without reversed Y coordinate EndIf If DrawingBufferPixelFormat() & #PB_PixelFormat_32Bits_RGB ; 32bit RGB, with or without reversed Y coordinate EndIf
Supported OS
All