Commit 8511eb64 authored by Michael Natterer's avatar Michael Natterer 😴

pdb: remove all compat procedures for the old lcms plug-in

parent e35df2f5
......@@ -28,7 +28,7 @@
#include "internal-procs.h"
/* 739 procedures registered total */
/* 733 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)
......
This diff is collapsed.
......@@ -1751,378 +1751,6 @@ CODE
);
}
sub plug_in_icc_profile_info {
$blurb = "Retrieve information about an image's color profile";
$help = <<'HELP';
This procedure returns information about the RGB color profile
attached to an image. If no RGB color profile is attached, sRGB is
assumed.
HELP
&neo_pdb_misc;
$date = '2015';
@inargs = (
{ name => 'image', type => 'image',
desc => 'Input image' }
);
@outargs = (
{ name => 'profile_name', type => 'string',
desc => 'Name' },
{ name => 'profile_desc', type => 'string',
desc => 'Description' },
{ name => 'profile_info', type => 'string',
desc => 'Info' }
);
%invoke = (
code => <<'CODE'
{
GimpColorProfile *profile;
profile = gimp_color_managed_get_color_profile (GIMP_COLOR_MANAGED (image));
if (profile)
{
profile_name = g_strdup (gimp_color_profile_get_model (profile));
profile_desc = g_strdup (gimp_color_profile_get_description (profile));
profile_info = g_strdup (gimp_color_profile_get_summary (profile));
}
}
CODE
);
}
sub plug_in_icc_profile_file_info {
$blurb = "Retrieve information about a color profile";
$help = <<'HELP';
This procedure returns information about an ICC color profile on disk.
HELP
&neo_pdb_misc;
$date = '2015';
@inargs = (
{ name => 'profile', type => 'string',
desc => 'Filename of an ICC color profile', allow_non_utf8 => 1 }
);
@outargs = (
{ name => 'profile_name', type => 'string',
desc => 'Name' },
{ name => 'profile_desc', type => 'string',
desc => 'Description' },
{ name => 'profile_info', type => 'string',
desc => 'Info' }
);
%invoke = (
code => <<'CODE'
{
GFile *file = g_file_new_for_path (profile);
if (file)
{
GimpColorProfile *p;
p = gimp_color_profile_new_from_file (file, error);
g_object_unref (file);
if (p)
{
profile_name = g_strdup (gimp_color_profile_get_model (p));
profile_desc = g_strdup (gimp_color_profile_get_description (p));
profile_info = g_strdup (gimp_color_profile_get_summary (p));
g_object_unref (p);
}
else
success = FALSE;
}
else
success = FALSE;
}
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))
{
GimpColorProfile *p = NULL;
if (profile)
{
GFile *file = g_file_new_for_path (profile);
if (file)
{
p = gimp_color_profile_new_from_file (file, error);
if (! p)
success = FALSE;
g_object_unref (file);
}
else
{
success = FALSE;
}
}
else if (image->gimp->config->color_management->rgb_profile)
{
p = gimp_color_config_get_rgb_color_profile (image->gimp->config->color_management,
error);
if (! p)
success = FALSE;
}
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))
{
GimpColorProfile *p = NULL;
if (image->gimp->config->color_management->rgb_profile)
{
p = gimp_color_config_get_rgb_color_profile (image->gimp->config->color_management,
error);
if (! p)
success = FALSE;
}
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";
$help = <<'HELP';
This procedure sets the user-configured RGB profile on an image using
the 'icc-profile' parasite. This procedure does not do any color
conversion.
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 }
);
%invoke = (
code => <<'CODE'
{
if (gimp_pdb_image_is_not_base_type (image, GIMP_GRAY, error))
{
GimpColorProfile *p = NULL;
if (profile)
{
GFile *file = g_file_new_for_path (profile);
if (file)
{
p = gimp_color_profile_new_from_file (file, error);
if (! p)
success = FALSE;
g_object_unref (file);
}
else
success = FALSE;
}
else if (image->gimp->config->color_management->rgb_profile)
{
p = gimp_color_config_get_rgb_color_profile (image->gimp->config->color_management,
error);
if (! p)
success = FALSE;
}
if (success)
{
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_MISC,
_("Set color profile"));
if (gimp_image_set_color_profile (image, p, error))
gimp_image_parasite_detach (image, "icc-profile-name");
else
success = FALSE;
gimp_image_undo_group_end (image);
if (! success)
gimp_image_undo (image);
if (p)
g_object_unref (p);
}
}
else
success = FALSE;
}
CODE
);
}
sub plug_in_icc_profile_set_rgb {
$blurb = "Set the default RGB color profile on the image";
$help = <<'HELP';
This procedure sets the user-configured RGB profile on an image using
the 'icc-profile' parasite. If no RGB profile is configured, sRGB is
assumed and the parasite is unset. This procedure does not do any
color conversion.
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' }
);
%invoke = (
code => <<'CODE'
{
if (gimp_pdb_image_is_not_base_type (image, GIMP_GRAY, error))
{
GimpColorProfile *p = NULL;
if (image->gimp->config->color_management->rgb_profile)
{
p = gimp_color_config_get_rgb_color_profile (image->gimp->config->color_management,
error);
if (! p)
success = FALSE;
}
if (success)
{
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_MISC,
_("Set color profile"));
if (gimp_image_set_color_profile (image, p, error))
gimp_image_parasite_detach (image, "icc-profile-name");
else
success = FALSE;
gimp_image_undo_group_end (image);
if (! success)
gimp_image_undo (image);
if (p)
g_object_unref (p);
}
}
else
success = FALSE;
}
CODE
);
}
sub plug_in_illusion {
$blurb = 'Superimpose many altered copies of the image';
......@@ -4952,7 +4580,6 @@ CODE
"core/gimpchannel.h"
"core/gimpcontext.h"
"core/gimpdrawable-operation.h"
"core/gimpimage-color-profile.h"
"core/gimpimage-crop.h"
"core/gimpimage-resize.h"
"core/gimpimage-rotate.h"
......@@ -4992,12 +4619,6 @@ CODE
plug_in_gauss_rle2
plug_in_glasstile
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
plug_in_laplace
plug_in_lens_distortion
......
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