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

Notification

Icon
Error

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

r.dozzo  
r.dozzo

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?

TIA

 

 

 

 

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)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 356


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:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/graphics/hh/graphics/grstrcts_181c0d6e-5908-4505-8093-956eefc87c85.xml.asp

Amin Dodin
LEADTOOLS Technical Support


 

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
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-2020, Yet Another Forum.NET
This page was generated in 0.082 seconds.