Color managed GtkImage



The observant among you will have noticed the icc-profile GdkPixbuf
option being added to GTK git master recently. This allows us to do
some clever stuff when reading and writing embedded color profiles. At
the moment I'm using this functionality in GcmImage[1] (superclass of
GtkImage) that automatically converts the color (using lcms) of the
GtkImage to the display profile.

Now, this functionality is obviously quite useful. It makes images
with embedded profiles appear correctly, just replacing the GtkImage
with a GcmImage. Rather than going to great lengths (like eog and gimp
do) to parse the image formats manually and extract the profile, it
all just works with no tricky code.
Of course, this sucks, as it's not in library form for other programs
to use. It sucks harder that it's not in GTK itself.

Now, Matthias has already said that he's not keen on a lcms dep for
GTK, (which I understand) but would adding the functionality to
GtkImage and registering an extension point be a wise thing to do? In
this case we add a lcms module (or argyll, etc) that implements the
conversion of the GdkPixbuf to display profile. All applications
become color managed for free.

Or we do something different, and just ship a gnome-color-manager
library, libgnomecolor (better names welcomed) that just ships this
code, and get applications to depend on that. I'm not overly keen on
this idea at the moment as we're trying to reduce the number of tiny
utility libraries, not increase them.

Ideas welcome.

Thanks,

Richard.

[1] http://git.gnome.org/browse/gnome-color-manager/plain/src/gcm-image.c


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]