Method XbpBitmap():getDefaultBGColor() Foundation

Retrieves the default background color of a bitmap.

:getDefaultBGColor() --> nRGBColor

The method returns an RGB-encoded color value representing the image's default background color. In case of an error, the return value is equivalent to the #define constant GRA_CLR_INVALID.


The :getDefaultBGColor() method retrieves the default background color of a bitmap. This method can be used to determine the default transparent color of an image, see :transparentClr instance variable.

Most images have their actual information located in the lower area of the image. Following this convention, this method essentially returns the color of the picture element (pixel) in the top-left corner of the image. Therefore, setting the color returned by :getDefaultBGColor() as the transparent color for a bitmap may produce unpredictable results for images that have part of their information located in the top-left corner!


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.