Commit e83d5e70 authored by Michael Natterer's avatar Michael Natterer

plug-ins, pdb: remove the lcms plug-in and add PDB compat procedures

parent 4266f86e
......@@ -28,7 +28,7 @@
#include "internal-procs.h"
/* 770 procedures registered total */
/* 772 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)
......
This diff is collapsed.
......@@ -144,8 +144,6 @@
/hot.exe
/jigsaw
/jigsaw.exe
/lcms
/lcms.exe
/mail
/mail.exe
/max-rgb
......
......@@ -115,7 +115,6 @@ libexec_PROGRAMS = \
guillotine \
hot \
jigsaw \
lcms \
$(MAIL) \
max-rgb \
metadata \
......@@ -1431,24 +1430,6 @@ jigsaw_LDADD = \
$(INTLLIBS) \
$(jigsaw_RC)
lcms_SOURCES = \
lcms.c
lcms_LDADD = \
$(libgimpui) \
$(libgimpwidgets) \
$(libgimpmodule) \
$(libgimp) \
$(libgimpmath) \
$(libgimpconfig) \
$(libgimpcolor) \
$(libgimpbase) \
$(GTK_LIBS) \
$(GEGL_LIBS) \
$(RT_LIBS) \
$(INTLLIBS) \
$(lcms_RC)
mail_SOURCES = \
mail.c
......
......@@ -69,7 +69,6 @@ grid_RC = grid.rc.o
guillotine_RC = guillotine.rc.o
hot_RC = hot.rc.o
jigsaw_RC = jigsaw.rc.o
lcms_RC = lcms.rc.o
mail_RC = mail.rc.o
max_rgb_RC = max-rgb.rc.o
metadata_RC = metadata.rc.o
......
This diff is collapsed.
......@@ -70,7 +70,6 @@
'guillotine' => {},
'hot' => { ui => 1 },
'jigsaw' => { ui => 1 },
'lcms' => { ui => 1, gegl => 1 },
'mail' => { ui => 1, optional => 1 },
'max-rgb' => { ui => 1 },
'metadata' => { ui => 1, libs => 'GEXIV2_LIBS', cflags => 'GEXIV2_CFLAGS' },
......
......@@ -74,7 +74,6 @@ plug-ins/common/grid.c
plug-ins/common/guillotine.c
plug-ins/common/hot.c
plug-ins/common/jigsaw.c
plug-ins/common/lcms.c
plug-ins/common/mail.c
plug-ins/common/max-rgb.c
plug-ins/common/metadata.c
......
......@@ -1849,6 +1849,133 @@ CODE
);
}
sub plug_in_icc_profile_apply {
$blurb = "Apply a color profile on the image";
$help = <<'HELP';
This procedure transform from the image's color profile (or the
default RGB profile if none is set) to the given ICC color
profile. Only RGB color profiles are accepted. The profile is then set
on the image using the 'icc-profile' "parasite.
HELP
&neo_pdb_misc;
$date = '2015';
@inargs = (
{ name => 'run_mode', type => 'enum GimpRunMode', dead => 1,
desc => 'The run mode' },
{ name => 'image', type => 'image',
desc => 'Input image' },
{ name => 'profile', type => 'string',
desc => 'Filename of an ICC color profile', allow_non_utf8 => 1 },
{ name => 'intent', type => 'enum GimpColorRenderingIntent',
desc => 'Rendering intent' },
{ name => 'bpc', type => 'boolean',
desc => 'Black point compensation' }
);
%invoke = (
code => <<'CODE'
{
if (gimp_pdb_image_is_not_base_type (image, GIMP_GRAY, error))
{
GFile *file = NULL;
GimpColorProfile *p = NULL;
if (profile)
file = g_file_new_for_path (profile);
else if (image->gimp->config->color_management->rgb_profile)
file = g_file_new_for_path (image->gimp->config->color_management->rgb_profile);
if (file)
{
p = gimp_color_profile_new_from_file (file, error);
if (! p)
success = FALSE;
g_object_unref (file);
}
if (success)
{
if (! p)
p = gimp_image_get_builtin_color_profile (image);
success = gimp_image_convert_color_profile (image, p, intent, bpc,
progress, error);
}
}
else
success = FALSE;
}
CODE
);
}
sub plug_in_icc_profile_apply_rgb {
$blurb = "Apply default RGB color profile on the image";
$help = <<'HELP';
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. 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.
HELP
&neo_pdb_misc;
$date = '2015';
@inargs = (
{ name => 'run_mode', type => 'enum GimpRunMode', dead => 1,
desc => 'The run mode' },
{ name => 'image', type => 'image',
desc => 'Input image' },
{ name => 'intent', type => 'enum GimpColorRenderingIntent',
desc => 'Rendering intent' },
{ name => 'bpc', type => 'boolean',
desc => 'Black point compensation' }
);
%invoke = (
code => <<'CODE'
{
if (gimp_pdb_image_is_not_base_type (image, GIMP_GRAY, error))
{
GFile *file = NULL;
GimpColorProfile *p = NULL;
if (image->gimp->config->color_management->rgb_profile)
file = g_file_new_for_path (image->gimp->config->color_management->rgb_profile);
if (file)
{
p = gimp_color_profile_new_from_file (file, error);
if (! p)
success = FALSE;
g_object_unref (file);
}
if (success)
{
if (! p)
p = gimp_image_get_builtin_color_profile (image);
success = gimp_image_convert_color_profile (image, p, intent, bpc,
progress, error);
}
}
else
success = FALSE;
}
CODE
);
}
sub plug_in_icc_profile_set {
$blurb = "Set a color profile on the image";
......@@ -4644,6 +4771,8 @@ CODE
plug_in_hsv_noise
plug_in_icc_profile_info
plug_in_icc_profile_file_info
plug_in_icc_profile_apply
plug_in_icc_profile_apply_rgb
plug_in_icc_profile_set
plug_in_icc_profile_set_rgb
plug_in_illusion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment