Miles Lane <[EMAIL PROTECTED]> writes:
> We'd like to add support for doing some color preprocessing for
> Gnome 2.0 GTK pixmap themes. We'd like to not reinvent the wheel
> and am hoping that we could use Gimp library functions to do
> the processing work. Is this currently supported? If not, would
> it be a lot of work to add support?
that functionality is in the GIMP core, not in a library. So if you'd
want to use it, you'd have to start a Gimp process to do the work.
It wouldn't be hard to control the GIMP application from the theme
capplet but I doubt that starting a GIMP session is what you want
Our plans for GIMP-2.0 aren't nailed down yet but we have a design
change planned that would allow to do what you suggest. You probably
don't want to wait for GIMP-2.0 though.
> How this would work, from a user's perspective, is that a new GTK
> theme capplet would include UI for specifying and previewing
> saturation/brightness/contrast and hue shifts for the images
> specified in the pixmap theme. Then, when a user's theme is
> loaded the images would get massaged and the resulting shifted
> images get cached and used for display.
If adjusting saturation/brightness/contrast and hue is all you want,
I'd suggest to just do it in place. You will end up writing more code
to interface with another application or library then if you'd just
insert the few lines needed to do localized color-correction.
BTW, you can adjust saturation of GdkPixbufs using the function
gdk_pixbuf_saturate_and_pixelate() which is part of GTK+-2.0. Other
color corrections could be coded in a similar way.
Gimp-developer mailing list