[colord] colord integration code examples to query display profile

Pascal de Bruijn pmjdebruijn at pcode.nl
Tue May 1 10:51:49 PDT 2012


On Mon, Apr 30, 2012 at 5:19 PM, Richard Hughes <hughsient at gmail.com> wrote:
> On 29 April 2012 18:31, Pascal de Bruijn <pmjdebruijn at pcode.nl> wrote:
>> So I'm guessing the following is preferred whenever "Try to use system
>> profile" is enabled (in any application):
>> 1. Ask colord which profile to apply
>> 2. use _ICC_PROFILE
>> 3. fall back to srgb if all else fails.
>
> Yes, that's probably sane.
>
>> Is there any example code, to get a display ICC profile for whatever
>> display an application is currently placed on?
>
> Sure, there's python and C here:
>
> https://gitorious.org/colord/master/blobs/master/examples/cd-find-device-by-property.py
> https://gitorious.org/colord/master/blobs/master/examples/cd-libcolord-find-device-by-property.c
>
>> This is probably the single most common use-case of querying colord,
>> it would probably help adoption if there were near-drop-in example
>> code.
>
> Sure. Do you want me to do some example code that can work out the
> correct device from the X window ID? gnome-color-manager used to
> provide that, but it got lost when we converted everything into
> gnome-settings-daemon.

That would be great, if you can spare the time at some point.

Regards,
Pascal de Bruijn


More information about the colord mailing list