> On 06 Sep 2016, at 15:54, Michael Natterer <mi...@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 = 
    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...

> 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 
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.


> Regards,
> --Mitch
>> I have tried the following:
>>   GimpColorConfig* color_config = gimp_get_color_configuration();
>>   if(color_config)
>>     GimpColorProfile* dpy_profile =
>> gimp_color_config_get_display_color_profile(color_config, NULL);
>> While the code compiles just fine, I get undefined symbol for
>> get_display_profile() function at link time. Note that
>> gimp_color_config_get_display_color_profile() is correctly found by
>> the linker, so I tend to exclude missing libraries in the linker
>> command, which I put here for reference:
>> /usr/bin/c++    -O0 -g -ansi -pedantic
>> -Dcimg_verbosity=3              -Dgmic_build -Dcimg_use_vt100
>> -Dgmic_is_parallel -Dcimg_use_abort  -std=gnu++11 -Wno-
>> error=narrowing -fno-ipa-sra -fpermissive -fopenmp
>> -Dcimg_use_openmp  -Dcimg_use_zlib  -Dcimg_display=1
>> -Dcimg_appname=\"gmic\"  -Dcimg_use_xshm  -Dcimg_use_fftw3  -
>> Dcimg_use_opencv  -Dcimg_use_magick  -Dcimg_use_tiff  -
>> Dcimg_use_png  -Dcimg_use_jpeg  -
>> Dcimg_use_openexr     CMakeFiles/gmic_gimp.dir/src/gmic.cpp.o
>> CMakeFiles/gmic_gimp.dir/src/gmic_gimp.cpp.o  -o gmic_gimp  -
>> L/zzz/lib -rdynamic -lSM -lICE -lX11 -lXext -ltiff -lpng -lz -ljpeg
>> -lGraphicsMagick++ -lGraphicsMagick -lIlmImf -lz -lImath -lHalf -lIex
>> -lIlmThread -lopencv_calib3d -lopencv_contrib -lopencv_core
>> -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui
>> -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_objdetect
>> -lopencv_ocl -lopencv_photo -lopencv_stitching -lopencv_superres
>> -lopencv_ts -lopencv_video -lopencv_videostab -lz -lfftw3 -lgimp-2.0
>> -lgimpmath-2.0 -lgimpconfig-2.0 -lgimpcolor-2.0 -lgimpbase-2.0
>> -lgdk_pixbuf-2.0 -lcairo -lgegl-0.3 -lgegl-npd-0.3 -lm -lgmodule-2.0
>> -ljson-glib-1.0 -lbabl-0.1 -lgio-2.0 -lgobject-2.0 -lglib-2.0
>> -lgimpui-2.0 -lgimpwidgets-2.0 -lgimpmodule-2.0 -lgimp-2.0
>> -lgimpmath-2.0 -lgimpconfig-2.0 -lgimpcolor-2.0 -lgimpbase-2.0 -lgtk-
>> x11-2.0 -lgegl-0.3 -lgegl-npd-0.3 -lm -lgmodule-2.0 -ljson-glib-1.0
>> -lbabl-0.1 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0
>> -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig
>> -lgobject-2.0 -lglib-2.0 -lfreetype -lpthread -lgomp  -lfftw3_threads 
>> -ljpeg -lGraphicsMagick++ -lGraphicsMagick -lIlmImf -lz -lImath
>> -lHalf -lIex -lIlmThread -lopencv_calib3d -lopencv_contrib
>> -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu
>> -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml
>> -lopencv_objdetect -lopencv_ocl -lopencv_photo -lopencv_stitching
>> -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab
>> -lfftw3 -lgimp-2.0 -lgimpmath-2.0 -lgimpconfig-2.0 -lgimpcolor-2.0
>> -lgimpbase-2.0 -lgdk_pixbuf-2.0 -lcairo -lgegl-0.3 -lgegl-npd-0.3 -lm
>> -lgmodule-2.0 -ljson-glib-1.0 -lbabl-0.1 -lgio-2.0 -lgobject-2.0
>> -lglib-2.0 -lgimpui-2.0 -lgimpwidgets-2.0 -lgimpmodule-2.0 -lgtk-x11-
>> 2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lpangocairo-1.0 -lpango-
>> 1.0 -lfontconfig -lgimp-2.0 -lgimpmath-2.0 -lgimpconfig-2.0
>> -lgimpcolor-2.0 -lgimpbase-2.0 -lgdk_pixbuf-2.0 -lcairo -lgegl-0.3
>> -lgegl-npd-0.3 -lm -lgmodule-2.0 -ljson-glib-1.0 -lbabl-0.1 -lgio-2.0 
>> -lgobject-2.0 -lglib-2.0 -lgimpui-2.0 -lgimpwidgets-2.0 -lgimpmodule-
>> 2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0
>> -lpangocairo-1.0 -lpango-1.0 -lfontconfig -lfreetype -lpthread
>> -lgomp  -lfftw3_threads -Wl,-rpath,/zzz/lib 
>> What could I be doing wrong? Or what is the right way to retrieve the
>> monitor profile?
>> Thanks in advance!
>> Andrea
>> _______________________________________________
>> gimp-developer-list mailing list
>> List address:    gimp-developer-list@gnome.org 
>> <mailto:gimp-developer-list@gnome.org>
>> List membership: https://mail.gnome.org/mailman/listinfo/gimp-develop 
>> <https://mail.gnome.org/mailman/listinfo/gimp-develop>
>> er-list
>> List archives:   https://mail.gnome.org/archives/gimp-developer-list 
>> <https://mail.gnome.org/archives/gimp-developer-list>
gimp-developer-list mailing list
List address:    gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list

Reply via email to