⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conversion-contexts-and-gamut-mapping.html

📁 linux图形界面x liberary手册
💻 HTML
字号:
<HTML><HEAD><TITLE>Xlib Programming Manual: Color Conversion Contexts and Gamut Mapping</TITLE></HEAD><BODY><A NAME="CCC"></A><H1 ALIGN=center>6.3 Color Conversion Contexts and Gamut Mapping</H1>When Xlib converts device-independent color specificationsinto device-dependent specifications and vice-versa,it uses knowledge about the color limitations of the screen hardware.This information, typically called the device profile,<!.IN "Device profile">is available in a Color Conversion Context (CCC).<!.IN "Color Conversion Context"><!.IN "CCC"><P>Because a specified color may be outside the color gamut of the target screenand the white point associated with the color specification may differfrom the white point inherent to the screen,Xlib applies gamut mapping when it encounters certain conditions:<!.IN "White point"><UL><P><LI>Gamut compression occurs when conversion of device-independentcolor specifications to device-dependent color specificationsresults in a color out of the target screen's gamut.<P><LI>White adjustment occurs when the inherent white point of the screendiffers from the white point assumed by the client.</UL><P>Gamut handling methods are stored as callbacks in the CCC,which in turn are used by the color space conversion routines.Client data is also stored in the CCC for each callback.The CCC also contains the white point the client assumes to beassociated with color specifications (that is, the Client White Point).<!.IN "Client White Point"><!.IN "Gamut compression"><!.IN "Gamut handling"><!.IN "White point adjustment">The client can specify the gamut handling callbacks and client dataas well as the Client White Point.Xlib does not preclude the X client from performing otherforms of gamut handling (for example, gamut expansion); however, Xlib does not provide direct support for gamut handlingother than white adjustment and gamut compression.<P>Associated with each colormap is an initial CCC transparently generated byXlib.<!.IN "Color Conversion Context" "creation">Therefore,when you specify a colormap as an argument to an Xlib function,you are indirectly specifying a CCC.<!.IN "CCC" "of colormap"><!.IN "Color Conversion Context" "of colormap">There is a default CCC associated with each screen.Newly created CCCs inherit attributes from the default CCC,so the default CCC attributes can be modified to affect new CCCs.<!.IN "CCC" "default"><!.IN "Color Conversion Context" "default"><A NAME="cmsStatus"></A><P>Xcms functions in which gamut mapping can occur return<B><A HREF="../introduction/errors.html#Status">Status</A></B> and have specific status values defined for them, as follows:<UL><P><LI><B>XcmsFailure</B>indicates that the function failed.<P><LI><B>XcmsSuccess</B>indicates that the function succeeded.In addition,if the function performed any color conversion,the colors did not need to be compressed.<P><LI><B>XcmsSuccessWithCompression</B>indicates the function performed color conversionand at least one of the colors needed to be compressed.The gamut compression method is determined by the gamut compressionprocedure in the CCC that is specified directly as a function argumentor in the CCC indirectly specified by means of the colormap argument.</UL><H5 ALIGN=right><I>Next: <A HREF="colormap.html">Creating, Copying, and Destroying Colormaps</A></I></H5><HR><ADDRESS><A HREF="http://tronche.com/">Christophe Tronche</A>, <A HREF="mailto:ch.tronche@computer.org">ch.tronche@computer.org</A></ADDRESS></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -