[Openicc] XICC specification draft

Sven Neumann sven at gimp.org
Fri Jun 24 11:43:20 EST 2005


Hi,

Ross Burton <ross at burtonini.com> writes:

> I've documented the atom (_ICC_PROFILE) my xicc tool and eog patches
> use to set/get the ICC profile for an X screen, and have put a draft
> of it here:
>
> http://burtonini.com/temp/xicc-specification-0.1.html
>
> I'd appreciate it if people would review it.  If it doesn't get too
> much bad feedback, I'll announce it publicly.

I've added preliminary (and yet untested) support for this to GIMP in
CVS so that we can play with it. If anyone's interested, the code for
retrieving the atom can be written entirely in GDK, there's no need to
use XLib for this:


      GdkAtom    type;
      gint       format;
      gint       nitems;
      guchar    *data;

      g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);

      if (gdk_property_get (gdk_screen_get_root_window (screen),
                            gdk_atom_intern ("_ICC_PROFILE", FALSE),
                            GDK_NONE,
                            0, G_MAXLONG,
                            FALSE,
                            &type, &format, &nitems, &data) && nitems)
        {
          cmsHPROFILE *profile = cmsOpenProfileFromMem (data, nitems);

          g_free (data);

          return profile;
        }


Sven



More information about the openicc mailing list