diff --git a/ChangeLog b/ChangeLog index 09fdf7cf9b..4a816b4085 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-10-23 Sven Neumann + + * plug-ins/common/mkgen.pl: link plug-ins with the same libraries + and in the same order as defined in the gimp.pc and gimpui.pc files. + + * plug-ins/common/Makefile.am: regenerated. + + * plug-ins/common/lcms.c: implemented missing functionality. + 2006-10-23 Sven Neumann * plug-ins/script-fu/scripts/unsharp-mask.scm: reverted Kevin's diff --git a/plug-ins/common/Makefile.am b/plug-ins/common/Makefile.am index d5ba872045..5e567c600c 100644 --- a/plug-ins/common/Makefile.am +++ b/plug-ins/common/Makefile.am @@ -13,6 +13,7 @@ libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la +libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).la libgimpui = $(top_builddir)/libgimp/libgimpui-$(GIMP_API_VERSION).la libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la @@ -211,11 +212,12 @@ AlienMap2_SOURCES = \ AlienMap2_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -226,11 +228,12 @@ CEL_SOURCES = \ CEL_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -241,11 +244,12 @@ CML_explorer_SOURCES = \ CML_explorer_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -256,11 +260,12 @@ aa_SOURCES = \ aa_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(LIBAA) \ $(GTK_LIBS) \ @@ -272,11 +277,12 @@ align_layers_SOURCES = \ align_layers_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -287,11 +293,12 @@ animationplay_SOURCES = \ animationplay_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -302,8 +309,9 @@ animoptimize_SOURCES = \ animoptimize_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -314,11 +322,12 @@ apply_lens_SOURCES = \ apply_lens_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -329,8 +338,9 @@ autocrop_SOURCES = \ autocrop_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -341,8 +351,9 @@ autostretch_hsv_SOURCES = \ autostretch_hsv_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -353,11 +364,12 @@ blinds_SOURCES = \ blinds_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -368,8 +380,9 @@ blur_SOURCES = \ blur_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -380,11 +393,12 @@ borderaverage_SOURCES = \ borderaverage_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -395,11 +409,12 @@ bumpmap_SOURCES = \ bumpmap_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -410,8 +425,9 @@ c_astretch_SOURCES = \ c_astretch_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -422,11 +438,12 @@ cartoon_SOURCES = \ cartoon_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -437,11 +454,12 @@ ccanalyze_SOURCES = \ ccanalyze_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -452,11 +470,12 @@ channel_mixer_SOURCES = \ channel_mixer_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -467,11 +486,12 @@ checkerboard_SOURCES = \ checkerboard_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -482,11 +502,12 @@ color_enhance_SOURCES = \ color_enhance_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -497,11 +518,12 @@ colorify_SOURCES = \ colorify_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -512,11 +534,12 @@ colormap_remap_SOURCES = \ colormap_remap_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -527,11 +550,12 @@ colortoalpha_SOURCES = \ colortoalpha_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -542,11 +566,12 @@ compose_SOURCES = \ compose_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -557,8 +582,9 @@ compressor_SOURCES = \ compressor_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -569,11 +595,12 @@ convmatrix_SOURCES = \ convmatrix_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -584,11 +611,12 @@ csource_SOURCES = \ csource_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -599,11 +627,12 @@ cubism_SOURCES = \ cubism_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -614,11 +643,12 @@ curve_bend_SOURCES = \ curve_bend_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -629,11 +659,12 @@ decompose_SOURCES = \ decompose_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -644,11 +675,12 @@ deinterlace_SOURCES = \ deinterlace_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -659,11 +691,12 @@ depthmerge_SOURCES = \ depthmerge_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -674,8 +707,9 @@ desktop_link_SOURCES = \ desktop_link_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -686,11 +720,12 @@ despeckle_SOURCES = \ despeckle_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -701,11 +736,12 @@ destripe_SOURCES = \ destripe_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -716,11 +752,12 @@ dicom_SOURCES = \ dicom_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -731,11 +768,12 @@ diffraction_SOURCES = \ diffraction_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -746,11 +784,12 @@ displace_SOURCES = \ displace_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -761,11 +800,12 @@ dog_SOURCES = \ dog_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -776,11 +816,12 @@ edge_SOURCES = \ edge_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -791,11 +832,12 @@ emboss_SOURCES = \ emboss_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -806,11 +848,12 @@ engrave_SOURCES = \ engrave_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -821,11 +864,12 @@ exchange_SOURCES = \ exchange_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -836,11 +880,12 @@ film_SOURCES = \ film_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -851,11 +896,12 @@ flarefx_SOURCES = \ flarefx_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -866,11 +912,12 @@ fp_SOURCES = \ fp_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -881,11 +928,12 @@ fractaltrace_SOURCES = \ fractaltrace_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -896,11 +944,12 @@ gauss_SOURCES = \ gauss_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -911,11 +960,12 @@ gbr_SOURCES = \ gbr_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -926,11 +976,12 @@ gee_SOURCES = \ gee_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -941,11 +992,12 @@ gee_zoom_SOURCES = \ gee_zoom_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -956,11 +1008,12 @@ gif_SOURCES = \ gif_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -971,8 +1024,9 @@ gifload_SOURCES = \ gifload_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -983,11 +1037,12 @@ gih_SOURCES = \ gih_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -998,11 +1053,12 @@ glasstile_SOURCES = \ glasstile_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1013,8 +1069,9 @@ glob_SOURCES = \ glob_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -1025,11 +1082,12 @@ gqbist_SOURCES = \ gqbist_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1040,11 +1098,12 @@ gradmap_SOURCES = \ gradmap_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -1055,11 +1114,12 @@ grid_SOURCES = \ grid_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1070,11 +1130,12 @@ gtm_SOURCES = \ gtm_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1085,8 +1146,9 @@ guillotine_SOURCES = \ guillotine_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -1097,11 +1159,12 @@ header_SOURCES = \ header_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1112,11 +1175,12 @@ hot_SOURCES = \ hot_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1127,11 +1191,12 @@ illusion_SOURCES = \ illusion_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1142,11 +1207,12 @@ iwarp_SOURCES = \ iwarp_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1157,11 +1223,12 @@ jigsaw_SOURCES = \ jigsaw_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1172,11 +1239,12 @@ laplace_SOURCES = \ laplace_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -1187,8 +1255,9 @@ lcms_SOURCES = \ lcms_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(LIBLCMS) \ $(GLIB_LIBS) \ @@ -1200,11 +1269,12 @@ lens_SOURCES = \ lens_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1215,11 +1285,12 @@ lic_SOURCES = \ lic_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1230,11 +1301,12 @@ mail_SOURCES = \ mail_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(LIBMAIL) \ $(GTK_LIBS) \ @@ -1246,11 +1318,12 @@ mapcolor_SOURCES = \ mapcolor_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1261,11 +1334,12 @@ max_rgb_SOURCES = \ max_rgb_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1276,11 +1350,12 @@ mblur_SOURCES = \ mblur_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1291,11 +1366,12 @@ mng_SOURCES = \ mng_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(LIBMNG) \ $(GTK_LIBS) \ @@ -1307,11 +1383,12 @@ mosaic_SOURCES = \ mosaic_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1322,11 +1399,12 @@ neon_SOURCES = \ neon_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1337,11 +1415,12 @@ newsprint_SOURCES = \ newsprint_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1352,11 +1431,12 @@ nlfilt_SOURCES = \ nlfilt_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1367,11 +1447,12 @@ noisify_SOURCES = \ noisify_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1382,8 +1463,9 @@ normalize_SOURCES = \ normalize_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -1394,11 +1476,12 @@ nova_SOURCES = \ nova_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1409,11 +1492,12 @@ oilify_SOURCES = \ oilify_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1424,11 +1508,12 @@ papertile_SOURCES = \ papertile_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1439,11 +1524,12 @@ pat_SOURCES = \ pat_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1454,11 +1540,12 @@ pcx_SOURCES = \ pcx_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1469,11 +1556,12 @@ photocopy_SOURCES = \ photocopy_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1484,11 +1572,12 @@ pix_SOURCES = \ pix_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1499,11 +1588,12 @@ pixelize_SOURCES = \ pixelize_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1514,11 +1604,12 @@ plasma_SOURCES = \ plasma_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1529,11 +1620,12 @@ plugin_browser_SOURCES = \ plugin_browser_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1546,11 +1638,12 @@ png_SOURCES = \ png_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(LIBPNG) \ $(GTK_LIBS) \ @@ -1562,11 +1655,12 @@ pnm_SOURCES = \ pnm_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1577,11 +1671,12 @@ polar_SOURCES = \ polar_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1594,11 +1689,12 @@ poppler_SOURCES = \ poppler_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(LIBPOPPLER) \ $(GTK_LIBS) \ @@ -1610,11 +1706,12 @@ postscript_SOURCES = \ postscript_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1625,11 +1722,12 @@ procedure_browser_SOURCES = \ procedure_browser_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1640,8 +1738,9 @@ psd_SOURCES = \ psd_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -1652,11 +1751,12 @@ psd_save_SOURCES = \ psd_save_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1667,11 +1767,12 @@ psp_SOURCES = \ psp_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(LIBZ) \ $(GTK_LIBS) \ @@ -1683,11 +1784,12 @@ randomize_SOURCES = \ randomize_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1698,11 +1800,12 @@ raw_SOURCES = \ raw_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1713,11 +1816,12 @@ redeye_SOURCES = \ redeye_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1728,11 +1832,12 @@ retinex_SOURCES = \ retinex_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1743,11 +1848,12 @@ ripple_SOURCES = \ ripple_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1758,8 +1864,9 @@ rotate_SOURCES = \ rotate_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -1770,11 +1877,12 @@ sample_colorize_SOURCES = \ sample_colorize_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1785,11 +1893,12 @@ scatter_hsv_SOURCES = \ scatter_hsv_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1800,11 +1909,12 @@ screenshot_SOURCES = \ screenshot_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(LIBSCREENSHOT) \ $(GTK_LIBS) \ @@ -1818,11 +1928,12 @@ sel_gauss_SOURCES = \ sel_gauss_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1833,8 +1944,9 @@ semiflatten_SOURCES = \ semiflatten_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -1845,11 +1957,12 @@ sharpen_SOURCES = \ sharpen_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1860,11 +1973,12 @@ shift_SOURCES = \ shift_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1875,11 +1989,12 @@ sinus_SOURCES = \ sinus_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1890,11 +2005,12 @@ smooth_palette_SOURCES = \ smooth_palette_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1905,11 +2021,12 @@ snoise_SOURCES = \ snoise_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1920,11 +2037,12 @@ sobel_SOURCES = \ sobel_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1935,11 +2053,12 @@ softglow_SOURCES = \ softglow_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1950,11 +2069,12 @@ sparkle_SOURCES = \ sparkle_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1965,11 +2085,12 @@ spheredesigner_SOURCES = \ spheredesigner_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1980,11 +2101,12 @@ spread_SOURCES = \ spread_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -1995,11 +2117,12 @@ struc_SOURCES = \ struc_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2010,11 +2133,12 @@ sunras_SOURCES = \ sunras_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2027,11 +2151,12 @@ svg_SOURCES = \ svg_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(LIBSVG) \ $(GTK_LIBS) \ @@ -2043,11 +2168,12 @@ tga_SOURCES = \ tga_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2058,11 +2184,12 @@ threshold_alpha_SOURCES = \ threshold_alpha_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2073,11 +2200,12 @@ tiff_SOURCES = \ tiff_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(LIBTIFF) \ $(GTK_LIBS) \ @@ -2089,11 +2217,12 @@ tile_SOURCES = \ tile_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2104,11 +2233,12 @@ tileit_SOURCES = \ tileit_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2119,8 +2249,9 @@ tiler_SOURCES = \ tiler_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -2131,11 +2262,12 @@ uniteditor_SOURCES = \ uniteditor_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2146,11 +2278,12 @@ unsharp_SOURCES = \ unsharp_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2161,11 +2294,12 @@ video_SOURCES = \ video_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2176,8 +2310,9 @@ vinvert_SOURCES = \ vinvert_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -2188,11 +2323,12 @@ vpropagate_SOURCES = \ vpropagate_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2203,11 +2339,12 @@ warp_SOURCES = \ warp_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2218,11 +2355,12 @@ waves_SOURCES = \ waves_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2233,8 +2371,9 @@ webbrowser_SOURCES = \ webbrowser_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ @@ -2245,11 +2384,12 @@ whirlpinch_SOURCES = \ whirlpinch_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2260,11 +2400,12 @@ wind_SOURCES = \ wind_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2277,11 +2418,12 @@ wmf_SOURCES = \ wmf_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(LIBWMF) \ $(GTK_LIBS) \ @@ -2293,11 +2435,12 @@ xbm_SOURCES = \ xbm_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2308,11 +2451,12 @@ xpm_SOURCES = \ xpm_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(LIBXPM) \ $(GTK_LIBS) \ @@ -2324,11 +2468,12 @@ xwd_SOURCES = \ xwd_LDADD = \ $(libgimpui) \ - $(libgimpconfig) \ $(libgimpwidgets) \ + $(libgimpmodule) \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GTK_LIBS) \ $(RT_LIBS) \ @@ -2339,8 +2484,9 @@ zealouscrop_SOURCES = \ zealouscrop_LDADD = \ $(libgimp) \ - $(libgimpcolor) \ $(libgimpmath) \ + $(libgimpconfig) \ + $(libgimpcolor) \ $(libgimpbase) \ $(GLIB_LIBS) \ $(RT_LIBS) \ diff --git a/plug-ins/common/lcms.c b/plug-ins/common/lcms.c index 80367a806a..c5e3c865cd 100644 --- a/plug-ins/common/lcms.c +++ b/plug-ins/common/lcms.c @@ -42,12 +42,49 @@ #define PLUG_IN_PROC_INFO "plug-in-icc-info" -static void query (void); -static void run (const gchar *name, - gint nparams, - const GimpParam *param, - gint *nreturn_vals, - GimpParam **return_vals); +enum +{ + STATUS, + PRODUCT_NAME, + PRODUCT_DESC, + PRODUCT_INFO, + MANUFACTURER, + MODEL, + COPYRIGHT, + NUM_RETURN_VALUES +}; + +static void query (void); +static void run (const gchar *name, + gint nparams, + const GimpParam *param, + gint *nreturn_vals, + GimpParam **return_vals); + +static GimpPDBStatusType lcms_icc_set (gint32 image, + const gchar *filename); +static GimpPDBStatusType lcms_icc_apply (gint32 image, + const gchar *filename); +static GimpPDBStatusType lcms_icc_info (gint32 image, + GimpParam *return_vals, + gint *n_return_vals); + +static cmsHPROFILE lcms_image_get_profile (gint32 image); +static gboolean lcms_image_set_profile (gint32 image, + const gchar *filename); +static void lcms_image_transform_pixels (gint32 image, + cmsHPROFILE src_profile, + cmsHPROFILE dest_profile); +static void lcms_image_transform_cmap (gint32 image, + cmsHPROFILE src_profile, + cmsHPROFILE dest_profile); + +static void lcms_drawable_transform (GimpDrawable *drawable, + cmsHTRANSFORM transform, + gdouble progress_start, + gdouble progress_end); + +static cmsHPROFILE lcms_config_get_profile (gchar **filename); const GimpPlugInInfo PLUG_IN_INFO = @@ -87,12 +124,12 @@ query (void) gimp_install_procedure (PLUG_IN_PROC_SET, "Set ICC color profile on the image", "This procedure sets an ICC color profile on an " - "image using the 'icc-profile' parasite. It does " + "image using the 'icc-profile' parasite. It does " "not do any color conversion.", "Sven Neumann", "Sven Neumann", "2006", - NULL, + N_("Set color profile"), "RGB*", GIMP_PLUGIN, G_N_ELEMENTS (args), 0, @@ -102,13 +139,13 @@ query (void) "Set the default RGB color profile on the image", "This procedure sets the user-configured RGB " "profile on an image using the 'icc-profile' " - "parasite. If no RGB profile is, sRGB is assumed " - "and the parasite is unset. This procedure does " - "not do any color conversion.", + "parasite. If no RGB profile is configured, sRGB " + "is assumed and the parasite is unset. This " + "procedure does not do any color conversion.", "Sven Neumann", "Sven Neumann", "2006", - NULL, + N_("Set default RGB profile"), "RGB*", GIMP_PLUGIN, G_N_ELEMENTS (base_args), 0, @@ -118,13 +155,13 @@ query (void) "Apply a color profile on the image", "This procedure transform from the image's color " "profile (or the default RGB profile if none is " - "set) to the given ICC color profile. The profile " + "set) to the given ICC color profile. The profile " "is then set on the image using the 'icc-profile' " "parasite.", "Sven Neumann", "Sven Neumann", "2006", - NULL, + N_("Apply color profile"), "RGB*", GIMP_PLUGIN, G_N_ELEMENTS (args), 0, @@ -134,14 +171,15 @@ query (void) "Apply default RGB color profile on the image", "This procedure transform from the image's color " "profile (or the default RGB profile if none is " - "set) to the configured default RGB color profile. " - "is then set on the image using the 'icc-profile' " - "parasite. If no RGB color profile is configured, " - "sRGB is assumed and the parasite is unset.", + "set) to the configured default RGB color profile. " + "The profile is then set on the image using the " + "'icc-profile' parasite. If no RGB color profile " + "is configured, sRGB is assumed and the parasite " + "is unset.", "Sven Neumann", "Sven Neumann", "2006", - NULL, + N_("Apply default RGB profile"), "RGB*", GIMP_PLUGIN, G_N_ELEMENTS (base_args), 0, @@ -150,12 +188,12 @@ query (void) gimp_install_procedure (PLUG_IN_PROC_INFO, "Retrieve information about an image's color profile", "This procedure returns information about the " - "color profile attached to an image. If no profile " + "color profile attached to an image. If no profile " "is attached, sRGB is assumed.", "Sven Neumann", "Sven Neumann", "2006", - NULL, + N_("Color Profile Information"), "RGB*", GIMP_PLUGIN, G_N_ELEMENTS (base_args), @@ -172,9 +210,7 @@ run (const gchar *name, { GimpRunMode run_mode; GimpPDBStatusType status = GIMP_PDB_SUCCESS; - static GimpParam values[1]; - - run_mode = param[0].data.d_int32; + static GimpParam values[6]; INIT_I18N (); @@ -184,31 +220,48 @@ run (const gchar *name, *nreturn_vals = 1; *return_vals = values; - if (nparams != 3) + if (nparams < 1) { values[0].data.d_status = GIMP_PDB_CALLING_ERROR; return; } + run_mode = param[0].data.d_int32; + if (strcmp (name, PLUG_IN_PROC_SET) == 0) { - status = GIMP_PDB_EXECUTION_ERROR; + if (nparams < 3) + status = GIMP_PDB_CALLING_ERROR; + else + status = lcms_icc_set (param[1].data.d_image, param[2].data.d_string); } else if (strcmp (name, PLUG_IN_PROC_SET_RGB) == 0) { - status = GIMP_PDB_EXECUTION_ERROR; + if (nparams < 2) + status = GIMP_PDB_CALLING_ERROR; + else + status = lcms_icc_set (param[1].data.d_image, NULL); } else if (strcmp (name, PLUG_IN_PROC_APPLY) == 0) { - status = GIMP_PDB_EXECUTION_ERROR; + if (nparams < 3) + status = GIMP_PDB_CALLING_ERROR; + else + status = lcms_icc_apply (param[1].data.d_image, param[2].data.d_string); } else if (strcmp (name, PLUG_IN_PROC_APPLY_RGB) == 0) { - status = GIMP_PDB_EXECUTION_ERROR; + if (nparams < 2) + status = GIMP_PDB_CALLING_ERROR; + else + status = lcms_icc_apply (param[1].data.d_image, NULL); } else if (strcmp (name, PLUG_IN_PROC_INFO) == 0) { - status = GIMP_PDB_EXECUTION_ERROR; + if (nparams < 2) + status = GIMP_PDB_CALLING_ERROR; + else + status = lcms_icc_info (param[1].data.d_image, values, nreturn_vals); } else { @@ -217,3 +270,413 @@ run (const gchar *name, values[0].data.d_status = status; } + +static GimpPDBStatusType +lcms_icc_set (gint32 image, + const gchar *filename) +{ + gboolean success; + + if (filename) + { + success = lcms_image_set_profile (image, filename); + } + else + { + GimpColorConfig *config = gimp_get_color_configuration (); + + success = lcms_image_set_profile (image, config->rgb_profile); + + g_object_unref (config); + } + + return success ? GIMP_PDB_SUCCESS : GIMP_PDB_EXECUTION_ERROR; +} + +static GimpPDBStatusType +lcms_icc_apply (gint32 image, + const gchar *filename) +{ + cmsHPROFILE src_profile = NULL; + cmsHPROFILE dest_profile = NULL; + gchar *name = NULL; + + if (filename) + { + dest_profile = cmsOpenProfileFromFile (filename, "r"); + + if (! dest_profile) + { + g_message (_("Could not open ICC profile from '%s'"), + gimp_filename_to_utf8 (filename)); + + return GIMP_PDB_EXECUTION_ERROR; + } + } + else + { + dest_profile = lcms_config_get_profile (&name); + } + + src_profile = lcms_image_get_profile (image); + + if (! src_profile && ! dest_profile) + return GIMP_PDB_SUCCESS; + + if (! src_profile) + src_profile = cmsCreate_sRGBProfile (); + + if (! dest_profile) + dest_profile = cmsCreate_sRGBProfile (); + + { + const gchar *src_name = cmsTakeProductName (src_profile); + const gchar *dest_name = cmsTakeProductName (dest_profile); + + if (! g_utf8_validate (src_name, -1, NULL)) + src_name = _("(invalid UTF-8 string)"); + + if (! g_utf8_validate (dest_name, -1, NULL)) + src_name = _("(invalid UTF-8 string)"); + + /* ICC color profile conversion */ + gimp_progress_init_printf (_("Converting from '%s' to '%s'"), + src_name, dest_name); + } + + switch (gimp_image_base_type (image)) + { + case GIMP_RGB: + case GIMP_GRAY: + lcms_image_transform_pixels (image, src_profile, dest_profile); + break; + + case GIMP_INDEXED: + lcms_image_transform_cmap (image, src_profile, dest_profile); + break; + } + + cmsCloseProfile (src_profile); + cmsCloseProfile (dest_profile); + + lcms_image_set_profile (image, filename ? filename : name); + + if (name) + g_free (name); + + gimp_progress_update (1.0); + + return GIMP_PDB_SUCCESS; +} + +static GimpPDBStatusType +lcms_icc_info (gint32 image, + GimpParam *return_vals, + gint *n_return_vals) +{ + cmsHPROFILE profile; + const gchar *info; + + profile = lcms_image_get_profile (image); + + if (! profile) + profile = cmsCreate_sRGBProfile (); + + /* product name */ + info = cmsTakeProductName (profile); + if (! g_utf8_validate (info, -1, NULL)) + info = _("(invalid UTF-8 string)"); + + return_vals[PRODUCT_NAME].data.d_string = g_strdup (info); + + /* product desc */ + info = cmsTakeProductDesc (profile); + if (! g_utf8_validate (info, -1, NULL)) + info = _("(invalid UTF-8 string)"); + + return_vals[PRODUCT_DESC].data.d_string = g_strdup (info); + + /* product info */ + info = cmsTakeProductInfo (profile); + if (! g_utf8_validate (info, -1, NULL)) + info = _("(invalid UTF-8 string)"); + + return_vals[PRODUCT_INFO].data.d_string = g_strdup (info); + + /* manufacturer */ + info = cmsTakeManufacturer (profile); + if (! g_utf8_validate (info, -1, NULL)) + info = _("(invalid UTF-8 string)"); + + return_vals[MANUFACTURER].data.d_string = g_strdup (info); + + /* model */ + info = cmsTakeModel (profile); + if (! g_utf8_validate (info, -1, NULL)) + info = _("(invalid UTF-8 string)"); + + return_vals[MODEL].data.d_string = g_strdup (info); + + /* copyright */ + info = cmsTakeCopyright (profile); + if (! g_utf8_validate (info, -1, NULL)) + info = _("(invalid UTF-8 string)"); + + return_vals[COPYRIGHT].data.d_string = g_strdup (info); + + cmsCloseProfile (profile); + + *n_return_vals = NUM_RETURN_VALUES; + + return GIMP_PDB_SUCCESS; +} + +static cmsHPROFILE +lcms_image_get_profile (gint32 image) +{ + GimpParasite *parasite; + cmsHPROFILE profile = NULL; + + g_return_val_if_fail (image != -1, cmsCreateNULLProfile ()); + + parasite = gimp_image_parasite_find (image, "icc-profile"); + + if (parasite) + { + profile = cmsOpenProfileFromMem ((gpointer) gimp_parasite_data (parasite), + gimp_parasite_data_size (parasite)); + + /* FIXME: we leak the parasite, the data is used by the profile */ + + if (! profile) + g_message (_("Data attached as 'icc-profile' does not appear to " + "be an ICC profile")); + } + else + { + profile = lcms_config_get_profile (NULL); + } + + return profile; +} + +static gboolean +lcms_image_set_profile (gint32 image, + const gchar *filename) +{ + gboolean success = FALSE; + + g_return_val_if_fail (image != -1, FALSE); + + if (filename) + { + GMappedFile *file; + cmsHPROFILE profile; + GError *error = NULL; + + file = g_mapped_file_new (filename, FALSE, &error); + + if (! file) + { + g_message (_("Could not open '%s' for reading: %s"), + gimp_filename_to_utf8 (filename), error->message); + g_error_free (error); + + return FALSE; + } + + /* check that this file is actually an ICC profile */ + profile = cmsOpenProfileFromMem (g_mapped_file_get_contents (file), + g_mapped_file_get_length (file)); + + if (profile) + { + GimpParasite *parasite; + + cmsCloseProfile (profile); + + parasite = gimp_parasite_new ("icc-profile", GIMP_PARASITE_PERSISTENT, + g_mapped_file_get_length (file), + g_mapped_file_get_contents (file)); + gimp_image_parasite_attach (image, parasite); + gimp_parasite_free (parasite); + + success = TRUE; + } + else + { + g_message (_("'%s' does not appear to be an ICC profile"), + gimp_filename_to_utf8 (filename)); + } + + g_mapped_file_free (file); + } + else + { + gimp_image_parasite_detach (image, "icc-profile"); + + success = TRUE; + } + + return success; +} + +static void +lcms_image_transform_pixels (gint32 image, + cmsHPROFILE src_profile, + cmsHPROFILE dest_profile) +{ + cmsHTRANSFORM transform = NULL; + DWORD last_format = 0; + gint *layers; + gint num_layers; + gint i; + + layers = gimp_image_get_layers (image, &num_layers); + + for (i = 0; i < num_layers; i++) + { + GimpDrawable *drawable = gimp_drawable_get (layers[i]); + DWORD format; + + switch (drawable->bpp) + { + case 1: + format = TYPE_GRAY_8; + break; + case 2: + format = TYPE_GRAYA_8; + break; + case 3: + format = TYPE_RGB_8; + break; + case 4: + format = TYPE_RGBA_8; + break; + + default: + g_warning ("%s: unexpected bpp", G_GNUC_FUNCTION); + continue; + } + + if (! transform || format != last_format) + { + if (transform) + cmsDeleteTransform (transform); + + transform = cmsCreateTransform (src_profile, format, + dest_profile, format, + INTENT_PERCEPTUAL, 0); + last_format = format; + } + + lcms_drawable_transform (drawable, transform, + (gdouble) i / num_layers, + (gdouble) (i + 1) / num_layers); + + gimp_drawable_detach (drawable); + } + + if (transform) + cmsDeleteTransform(transform); + + g_free (layers); +} + +static void +lcms_image_transform_cmap (gint32 image, + cmsHPROFILE src_profile, + cmsHPROFILE dest_profile) +{ + cmsHTRANSFORM transform; + guchar *cmap; + gint num_colors; + + cmap = gimp_image_get_colormap (image, &num_colors); + + transform = cmsCreateTransform (src_profile, TYPE_RGB_8, + dest_profile, TYPE_RGB_8, + INTENT_PERCEPTUAL, 0); + + cmsDoTransform (transform, cmap, cmap, num_colors * 3); + + cmsDeleteTransform(transform); + + gimp_image_set_colormap (image, cmap, num_colors); +} + +static void +lcms_drawable_transform (GimpDrawable *drawable, + cmsHTRANSFORM transform, + gdouble progress_start, + gdouble progress_end) +{ + GimpPixelRgn rgn; + gpointer pr; + gdouble range = progress_end - progress_start; + guint count = 0; + guint done = 0; + + gimp_pixel_rgn_init (&rgn, drawable, + 0, 0, drawable->width, drawable->height, TRUE, FALSE); + + for (pr = gimp_pixel_rgns_register (1, &rgn); + pr != NULL; + pr = gimp_pixel_rgns_process (pr)) + { + guchar *data = rgn.data; + gint y; + + for (y = 0; y < rgn.h; y++) + { + cmsDoTransform (transform, data, data, rgn.w * rgn.bpp); + + data += rgn.rowstride; + } + + done += rgn.h * rgn.w; + + if (count++ % 16 == 0) + gimp_progress_update (progress_start + + (gdouble) done / + (drawable->width * drawable->height) * range); + } + + gimp_progress_update (progress_end); + + gimp_drawable_flush (drawable); + gimp_drawable_update (drawable->drawable_id, + 0, 0, drawable->width, drawable->height); +} + +static cmsHPROFILE +lcms_config_get_profile (gchar **filename) +{ + GimpColorConfig *config; + cmsHPROFILE profile = NULL; + + g_return_val_if_fail (filename == NULL || *filename == NULL, NULL); + + config = gimp_get_color_configuration (); + + g_return_val_if_fail (GIMP_IS_COLOR_CONFIG (config), NULL); + + if (config->rgb_profile) + { + profile = cmsOpenProfileFromFile (config->rgb_profile, "r"); + + if (! profile) + { + g_message (_("Could not open ICC profile from '%s'"), + gimp_filename_to_utf8 (config->rgb_profile)); + } + else if (filename) + { + *filename = g_strdup (config->rgb_profile); + } + } + + g_object_unref (config); + + return profile; +} diff --git a/plug-ins/common/mkgen.pl b/plug-ins/common/mkgen.pl index 13e07d6021..40099a6220 100755 --- a/plug-ins/common/mkgen.pl +++ b/plug-ins/common/mkgen.pl @@ -53,6 +53,7 @@ libgimpbase = \$(top_builddir)/libgimpbase/libgimpbase-\$(GIMP_API_VERSION).la libgimpcolor = \$(top_builddir)/libgimpcolor/libgimpcolor-\$(GIMP_API_VERSION).la libgimpconfig = \$(top_builddir)/libgimpconfig/libgimpconfig-\$(GIMP_API_VERSION).la libgimpmath = \$(top_builddir)/libgimpmath/libgimpmath-\$(GIMP_API_VERSION).la +libgimpmodule = \$(top_builddir)/libgimpmodule/libgimpmodule-\$(GIMP_API_VERSION).la libgimpui = \$(top_builddir)/libgimp/libgimpui-\$(GIMP_API_VERSION).la libgimpwidgets = \$(top_builddir)/libgimpwidgets/libgimpwidgets-\$(GIMP_API_VERSION).la @@ -108,19 +109,17 @@ foreach (sort keys %plugins) { if (exists $plugins{$_}->{ui}) { $libgimp .= "\$(libgimpui)"; - $libgimp .= "\t\t\\\n\t\$(libgimpconfig)"; - $libgimp .= "\t\\\n\t\$(libgimpwidgets)"; - $libgimp .= "\t\\\n\t\$(libgimp)"; - $libgimp .= "\t\t\\\n\t\$(libgimpcolor)"; - $libgimp .= "\t\t\\\n\t\$(libgimpmath)"; - $libgimp .= "\t\t\\\n\t\$(libgimpbase)"; - } else { - $libgimp .= "\$(libgimp)"; - $libgimp .= "\t\t\\\n\t\$(libgimpcolor)"; - $libgimp .= "\t\t\\\n\t\$(libgimpmath)"; - $libgimp .= "\t\t\\\n\t\$(libgimpbase)"; + $libgimp .= "\t\t\\\n\t\$(libgimpwidgets)"; + $libgimp .= "\t\\\n\t\$(libgimpmodule)"; + $libgimp .= "\t\\\n\t"; } + $libgimp .= "\$(libgimp)"; + $libgimp .= "\t\t\\\n\t\$(libgimpmath)"; + $libgimp .= "\t\t\\\n\t\$(libgimpconfig)"; + $libgimp .= "\t\\\n\t\$(libgimpcolor)"; + $libgimp .= "\t\t\\\n\t\$(libgimpbase)"; + my $optlib = ""; if (exists $plugins{$_}->{optional} || exists $plugins{$_}->{extralibs} ) { my $name = exists $plugins{$_}->{libopt} ? $plugins{$_}->{libopt} : $_;