Why can’t I get the desired filling color if the bitmap format is not ARGB or RGB or if the bitmap contains alpha channel when using the interface FSCRT_Bitmap_FillRect?
Before SDK 4.4 version, there exist two bugs when using the interface FSCRT_Bitmap_FillRect to fill a bitmap object with a specified color.
- FSCRT_Bitmap_FillRect just only receives the color format of ARGB, but it does not judge the
format of the bitmap and treats all bitmap formats as ARGB. So, users cannot get the desired
filling color if the bitmap format is not ARGB or RGB.
For example, assume that the bitmap format is BGR. Interface FSCRT_Bitmap_FillRect will also
treat it as RGB, and then the component value of R and B will be exchanged, which leads to
unexpected filling color.
- If you use 0xffxxxxxx to fill a bitmap that contains alpha channel, some rendering contents will
These two bugs have been fixed in PDF SDK 4.4 version.
Note: This article refers to a deprecated version of a Foxit Product. If you are still using Foxit PDF SDK 5.3 or older, please refer to your download package documents for Developer Guide and API Reference.
Get a trial version of the new Foxit PDF SDK and see our latest generation SDK’s brand new features!
Updated on March 26, 2017