Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Friday, June 24, 2005 4:57:48 AM(UTC)


Groups: Registered
Posts: 7

Is there a way to know which color order to set when loading an image? That is, how can I test whether the output device is a RGB device or a BGR device?

Demo32 sources simply set fIsBGRDevice to TRUE at the beginning, then I can switch to FALSE and back to TRUE. But is there a way to initialize a similar flag for any current output device, without having the user to manually switch to the correct settings if the image is not displayed with the correct colors?

Or *every* Windows output device is BGR, so the initial setting for flag fIsBGRDevice is always correct?






Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, June 29, 2005 5:50:19 AM(UTC)


Groups: Manager, Tech Support
Posts: 367

Was thanked: 1 time(s) in 1 post(s)

In Windows GDI, a device-independent bitmap (DIB) is stored in the BGR color order. Painting functions in LEADTOOLS draw on GDI device contexts; that's why our demos default to BGR. There could be other devices (such as some printers) that render image data in the RGB order. Check out ulPrimaryOrder member of the GDIINFO structure, which describes the graphics capabilities of a device. Here's a link to the DDK documentation:


Amin Dodin
LEADTOOLS Technical Support


Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.302 seconds.