|
Logical Colors, Gamuts, and Gamut Matching
By default, Windows disables image color matching to ensure that existing
applications continue to draw color images as originally intended. You can enable
image color matching for a device context by using the SetICMMode function. You must enable image color matching for each device context you
intend to use for output.
Once you enable image color matching, you can create a color space and select it into the device contexts of the devices you wish to use. The
color space defines the set of logical colors that you may use to draw. For each
device, the system or the device driver transforms the logical colors to device
(or physical) colors in a way that ensures consistency across devices.
To use a color from the color space, you specify a logical color value. The format of the value depends on the color space type. In some color
spaces, this is similar to RGB (red, green, blue) color value described in previous
Windows documentation, but the red, green, and blue components of logical color
values are defined in terms of independent colormetric measure rather than
arbitrary color units imposed by a device driver. In other cases, you may use
color values that actually contain CMYK (cyan, magenta, yellow, black) values.
Not all devices support all colors. You can determine which colors are
supported by a given device by checking its gamut, the set of colors it can produce. Different devices have different gamuts.
For example, the screen can display cyans that no printer can produce; likewise,
there are some reds on a page that never appear on a display.
An important element of image color matching is gamut matching, the process of finding color matches in the gamuts of different devices.
This can range from the simple (such as truncating to the surface of the printer
gamut), to the sophisticated (such as moving all colors a bit to maintain
contrasts). Matching is not simply the process of ensuring that each pixel is
faithfully reproduced with a given color. Instead, image color matching works within
the capabilities of the given output device to produce an image in which the
colors have the same relation to one another as they do when produced on other
devices.
You can determine whether given colors are within the gamut of a device by
using the CheckColorsInGamut function. This is useful for determining whether the screen has a larger
gamut than the current printer. In such cases, you can notify the user of which
screen colors won't print. You can preview the colors of a print job on the screen
by using the ColorMatchToTarget function. The function first uses the current color space and gamut-matching
method of a given device context, such as for a printer, to convert the colors
in an image. It then converts the converted image to display on the preview
device.
Image color matching applies to any drawing operation in which colors are
given as color values. It affects colors that you specify directly, such as when
setting the color of individual pixels using the SetPixel function, or indirectly, when you set the colors in pens, brushes, fonts and
other graphics objects. Image color matching does not apply to device-dependent
bitmaps, such as those created by the CreateBitmap and CreateCompatibleBitmap functions.
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|