[compiz] color management spec

Tomas Carnecky tom at dbservice.com
Fri May 30 05:08:37 PDT 2008


As part of my GSoC project I have to work out a spec that covers how
applications should communicate color management related properties
between each other and the compositing manager. The main idea of the
project is to let the compositing manager do the color management on
behalf of the applications. But before that can happen, the applications
have to tell the compositing manager how they want to have their colors
managed. The following spec I came up with should cover exactly that
communication.

How colors should be interpreted is defined in so called 'ICC Profiles',
that is a blob that contains all the necessary informations how colors
should be interpreted. These profiles are attached to windows so that
the compositing manager can get them and do the necessary color
conversion. To allow for fine-grained color management (if an
application has only a region that it wants to have color managed), the
applications have to be able to specify subregions of their window and
attach profiles to that. Since toolkits (at least GTK+) already make
heavy use of subwindows, using those makes sense to me. So I came up
with a document (in the attachment) that describes which window
properties and messages are used.

Dennis Kasprzyk (compiz developer) wasn't happy that I want to attach
properties to subwindows, instead he suggested to attach a list to the
top-level window containing tuples of [(sub)window XID / Profile]. But
I'd like to keep the properties on the subwindows, I think that will
make it easier for toolkits. In GTK+ for example, widgets that create
their own subwindow will be able to do the color management completely
independent of the other widgets. If all profiles are kept in the
top-level window then the widgets first have to find the top-level
window and then coordinate with other widgets how to create the list.
I'd like to hear other opinions on that.

thanks
tom


-------------- next part --------------

   Color Management Spec
  -----------------------

  Overview:

  Each window can have a color profile attached. This profile is used by the
  compositing manager to perform automatic colorspace tranformations.


  _NET_COLOR_PROFILE window property

  This property specifies the profile. The only type currently supported is
  'ICC', it specifies that the data is an ICC profile. Other profile types
  may be added at a later time. Profiles are inherited from the parent window.
  Applications can disable the automatic colorspace transformation by setting
  the profile to None.


  _NET_COLOR_MANAGER client message

  By sending this client message to the compositing manager, the application
  requests that the compositing manager checks whether it can perform the
  needed colorspace transformations. Upon recieving this client message, the
  compositing manager traverses the subwindows of the application and saves the
  attached profiles. It then checks whether it can perform the requested
  colorspace transformation and sends a reply to the application. The reply is
  either positive or negative. Upon a positive reply the application can expect
  that the colors will be automatically corrected by the compositing manager.
  A negative reply contains a list of all the windows on which the compositing
  manager can't perform the colorspace transformation. Usually due to the
  lack of the needed color management module.



More information about the compiz mailing list