mirror of https://github.com/GNOME/gimp.git
configure.in plug-ins/common/Makefile.am plug-ins/common/mkgen.pl
2006-09-28 Sven Neumann <sven@gimp.org> * configure.in * plug-ins/common/Makefile.am * plug-ins/common/mkgen.pl * plug-ins/common/plugin-defs.pl * plug-ins/common/lcms.c: build framework for ICC color conversion plug-in using littleCMS.
This commit is contained in:
parent
e6d34e4f68
commit
05c1cb7f66
|
@ -1,3 +1,12 @@
|
|||
2006-09-28 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* configure.in
|
||||
* plug-ins/common/Makefile.am
|
||||
* plug-ins/common/mkgen.pl
|
||||
* plug-ins/common/plugin-defs.pl
|
||||
* plug-ins/common/lcms.c: build framework for ICC color conversion
|
||||
plug-in using littleCMS.
|
||||
|
||||
2006-09-28 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/display/gimpdisplayshell.[ch]: added
|
||||
|
|
|
@ -1321,6 +1321,7 @@ if test "x$with_lcms" != xno; then
|
|||
])
|
||||
if test $have_lcms = yes; then
|
||||
LCMS_LIBS="-llcms"
|
||||
LCMS="lcms"
|
||||
else
|
||||
have_lcms="no (lcms not found or unusable)"
|
||||
fi
|
||||
|
@ -1328,6 +1329,7 @@ else
|
|||
have_lcms="no (lcms support disabled)"
|
||||
fi
|
||||
|
||||
AC_SUBST(LCMS)
|
||||
AC_SUBST(LCMS_LIBS)
|
||||
AM_CONDITIONAL(HAVE_LCMS, test $have_lcms = yes)
|
||||
|
||||
|
@ -1869,6 +1871,7 @@ Extra Binaries:
|
|||
Optional Plug-Ins:
|
||||
Ascii Art: $have_libaa
|
||||
Help Browser: $have_gtkhtml2
|
||||
LCMS: $have_lcms
|
||||
JPEG: $jpeg_ok
|
||||
MNG: $have_libmng
|
||||
PDF: $have_poppler
|
||||
|
@ -1897,4 +1900,3 @@ Optional Modules:
|
|||
Color Correction: $have_lcms
|
||||
Soft Proof: $have_lcms
|
||||
]);
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ illusion
|
|||
iwarp
|
||||
jigsaw
|
||||
laplace
|
||||
lcms
|
||||
lens
|
||||
lic
|
||||
mail
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
## plug-ins you should only need to modify plugin-defs.pl.
|
||||
|
||||
|
||||
libgimp = $(top_builddir)/libgimp/libgimp-$(GIMP_API_VERSION).la
|
||||
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
|
||||
libgimpui = $(top_builddir)/libgimp/libgimpui-$(GIMP_API_VERSION).la
|
||||
libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
|
||||
libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
|
||||
libgimp = $(top_builddir)/libgimp/libgimp-$(GIMP_API_VERSION).la
|
||||
libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
|
||||
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
|
||||
libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
|
||||
|
||||
|
||||
if OS_WIN32
|
||||
mwindows = -mwindows
|
||||
|
@ -101,6 +102,7 @@ libexec_PROGRAMS = \
|
|||
iwarp \
|
||||
jigsaw \
|
||||
laplace \
|
||||
$(LCMS) \
|
||||
lens \
|
||||
lic \
|
||||
$(MAIL) \
|
||||
|
@ -181,6 +183,7 @@ libexec_PROGRAMS = \
|
|||
|
||||
EXTRA_PROGRAMS = \
|
||||
aa \
|
||||
lcms \
|
||||
mail \
|
||||
mng \
|
||||
png \
|
||||
|
@ -1179,6 +1182,19 @@ laplace_LDADD = \
|
|||
$(RT_LIBS) \
|
||||
$(INTLLIBS)
|
||||
|
||||
lcms_SOURCES = \
|
||||
lcms.c
|
||||
|
||||
lcms_LDADD = \
|
||||
$(libgimp) \
|
||||
$(libgimpcolor) \
|
||||
$(libgimpmath) \
|
||||
$(libgimpbase) \
|
||||
$(LIBLCMS) \
|
||||
$(GLIB_LIBS) \
|
||||
$(RT_LIBS) \
|
||||
$(INTLLIBS)
|
||||
|
||||
lens_SOURCES = \
|
||||
lens.c
|
||||
|
||||
|
|
|
@ -0,0 +1,140 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib.h> /* lcms.h uses the "inline" keyword */
|
||||
|
||||
#ifdef HAVE_LCMS_LCMS_H
|
||||
#include <lcms/lcms.h>
|
||||
#else
|
||||
#include <lcms.h>
|
||||
#endif
|
||||
|
||||
#include <libgimp/gimp.h>
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
#define PLUG_IN_PROC_SET "plug-in-icc-set"
|
||||
#define PLUG_IN_PROC_APPLY "plug-in-icc-apply"
|
||||
|
||||
|
||||
static void query (void);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
|
||||
const GimpPlugInInfo PLUG_IN_INFO =
|
||||
{
|
||||
NULL, /* init_proc */
|
||||
NULL, /* quit_proc */
|
||||
query, /* query_proc */
|
||||
run, /* run_proc */
|
||||
};
|
||||
|
||||
MAIN ()
|
||||
|
||||
static void
|
||||
query (void)
|
||||
{
|
||||
static const GimpParamDef args[] =
|
||||
{
|
||||
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
|
||||
{ GIMP_PDB_IMAGE, "image", "Input image" },
|
||||
{ GIMP_PDB_STRING, "profile", "Filename of an ICC color profile" }
|
||||
};
|
||||
|
||||
gimp_install_procedure (PLUG_IN_PROC_SET,
|
||||
"Set a color profile on the image w/o applying it",
|
||||
"This procedure sets an ICC color profile on an "
|
||||
"image using the 'icc-profile' parasite. It does "
|
||||
"not do any color conversion.",
|
||||
"Sven Neumann",
|
||||
"Sven Neumann",
|
||||
"2006",
|
||||
"Set ICC Color Profile",
|
||||
"RGB*",
|
||||
GIMP_PLUGIN,
|
||||
G_N_ELEMENTS (args), 0,
|
||||
args, NULL);
|
||||
|
||||
gimp_install_procedure (PLUG_IN_PROC_APPLY,
|
||||
"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 "
|
||||
"is then set on the image using the 'icc-profile' "
|
||||
"parasite.",
|
||||
"Sven Neumann",
|
||||
"Sven Neumann",
|
||||
"2006",
|
||||
"Apply ICC Color Profile",
|
||||
"RGB*",
|
||||
GIMP_PLUGIN,
|
||||
G_N_ELEMENTS (args), 0,
|
||||
args, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
GimpRunMode run_mode;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
static GimpParam values[1];
|
||||
|
||||
run_mode = param[0].data.d_int32;
|
||||
|
||||
INIT_I18N ();
|
||||
|
||||
values[0].type = GIMP_PDB_STATUS;
|
||||
values[0].data.d_status = status;
|
||||
|
||||
*nreturn_vals = 1;
|
||||
*return_vals = values;
|
||||
|
||||
if (nparams != 3)
|
||||
{
|
||||
values[0].data.d_status = GIMP_PDB_CALLING_ERROR;
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp (name, PLUG_IN_PROC_SET) == 0)
|
||||
{
|
||||
status = GIMP_PDB_EXECUTION_ERROR;
|
||||
}
|
||||
else if (strcmp (name, PLUG_IN_PROC_APPLY) == 0)
|
||||
{
|
||||
status = GIMP_PDB_EXECUTION_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
status = GIMP_PDB_CALLING_ERROR;
|
||||
}
|
||||
|
||||
values[0].data.d_status = status;
|
||||
}
|
|
@ -48,13 +48,14 @@ print MK <<EOT;
|
|||
## plug-ins you should only need to modify plugin-defs.pl.
|
||||
|
||||
|
||||
libgimp = \$(top_builddir)/libgimp/libgimp-\$(GIMP_API_VERSION).la
|
||||
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
|
||||
libgimpui = \$(top_builddir)/libgimp/libgimpui-\$(GIMP_API_VERSION).la
|
||||
libgimpwidgets = \$(top_builddir)/libgimpwidgets/libgimpwidgets-\$(GIMP_API_VERSION).la
|
||||
libgimpconfig = \$(top_builddir)/libgimpconfig/libgimpconfig-\$(GIMP_API_VERSION).la
|
||||
libgimp = \$(top_builddir)/libgimp/libgimp-\$(GIMP_API_VERSION).la
|
||||
libgimpcolor = \$(top_builddir)/libgimpcolor/libgimpcolor-\$(GIMP_API_VERSION).la
|
||||
libgimpbase = \$(top_builddir)/libgimpbase/libgimpbase-\$(GIMP_API_VERSION).la
|
||||
libgimpmath = \$(top_builddir)/libgimpmath/libgimpmath-\$(GIMP_API_VERSION).la
|
||||
|
||||
|
||||
if OS_WIN32
|
||||
mwindows = -mwindows
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
'iwarp' => { libdep => 'gtk', ui => 1 },
|
||||
'jigsaw' => { libdep => 'gtk', ui => 1 },
|
||||
'laplace' => { libdep => 'glib', ui => 1 },
|
||||
'lcms' => { libdep => 'glib', optional => 1, extralibs => 1 },
|
||||
'lens' => { libdep => 'gtk', ui => 1 },
|
||||
'lic' => { libdep => 'gtk', ui => 1 },
|
||||
'mail' => { libdep => 'gtk', ui => 1, optional => 1 },
|
||||
|
|
Loading…
Reference in New Issue