Re: [Gimp-developer] How to retrieve the monitor profile from inside a plug-in



On Tue, 2016-09-06 at 16:30 +0200, Carmelo DrRaw wrote:

On 06 Sep 2016, at 15:54, Michael Natterer <mitch gimp org> wrote:

On Tue, 2016-09-06 at 09:53 +0200, Carmelo DrRaw wrote:

Dear experts,

I am trying to improve the G’MIC plug-in by adding color
management
of the preview area. For this, I need to retrieve the GIMP
monitor
profile from inside the plug-in code.

What preview area do you use? In git master you simply call

gimp_color_area_set_color_config()

G’MIC uses the following code to initialise the preview area:

    const int preview_drawable_id =
gimp_image_get_active_drawable(preview_image_id?preview_image_id:imag
e_id);
    gui_preview =
gimp_zoom_preview_new_from_drawable_id(preview_drawable_id);


Can it be used with gimp_color_area_set_color_config()? I could not
find any documentation of the latter function...

In GIMP git master, you would say

gimp_preview_area_set_color_config (gimp_preview_get_area (preview),
                                    gimp_get_color_configuration ());

I wouldn't bother to do anything with plug-in color management.


I don’t understand what you mean… in the G’MIC plug-in, the preview
area is used to judge the visual output of a given filter, and to
tweak parameters accordingly. 
However, if the monitor profile is not taken into account by the
plug-in, in many cases the g’mic preview will not match what the user
sees on screen once the plug-in is closed… this makes any serious
usage of the g’mic plug-in at least questionable.

So personally I bother a lot improving the g’mic plug-in in this
direction, and I’m ready to spend some spare time on that. But I need
to know how to retrieve the monitor profile.

My question was if this is a plug-in against GIMP 2.8 (soon obsolete)
or against GIMP git master.

I wouldn't bother do add color management to a GIMP 2.8 plug-in
and I have never tried.

Regards,
--Mitch



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