mirror of https://github.com/GNOME/gimp.git
libgimp/.cvsignore libgimp/Makefile.am libgimp/gimp.h removed
2001-05-22 Michael Natterer <mitch@gimp.org> * libgimp/.cvsignore * libgimp/Makefile.am * libgimp/gimp.h * libgimp/gimpfeatures.h.in: removed gimpfeatures.h * libgimpbase/.cvsignore * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimpbasetypes.h * libgimpbase/gimpversion.h.in: and added it as gimpversion.h * configure.in: changed accordingly. * app/app_procs.c * app/main.c * app/gui/about-dialog.c * app/gui/splash.c * app/pdb/misc_cmds.c * tools/pdbgen/pdb/misc.pdb: fixed includes. * plug-ins/bmp/bmpread.c * plug-ins/bmp/bmpwrite.c * plug-ins/common/gif.c * plug-ins/common/gifload.c * plug-ins/common/jpeg.c * plug-ins/common/newsprint.c * plug-ins/common/ps.c * plug-ins/common/tiff.c * plug-ins/gdyntext/gdyntextcompat.h * plug-ins/gimpressionist/gimpressionist.c * plug-ins/perl/Gimp.xs * plug-ins/perl/Gimp/Lib.xs * plug-ins/pygimp/gimpmodule.c * tools/gimp-remote.c: removed all #ifdef GIMP_HAVE_BLAH conditionals as they are broken anyway since we changed all plug-ins with perl scripts shortly before 1.2. Also, refering to intermediate unstable releases is evil.
This commit is contained in:
parent
dd4b03ec29
commit
1cd6fcc19c
40
ChangeLog
40
ChangeLog
|
@ -1,3 +1,43 @@
|
|||
2001-05-22 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* libgimp/.cvsignore
|
||||
* libgimp/Makefile.am
|
||||
* libgimp/gimp.h
|
||||
* libgimp/gimpfeatures.h.in: removed gimpfeatures.h
|
||||
|
||||
* libgimpbase/.cvsignore
|
||||
* libgimpbase/Makefile.am
|
||||
* libgimpbase/gimpbase.h
|
||||
* libgimpbase/gimpbasetypes.h
|
||||
* libgimpbase/gimpversion.h.in: and added it as gimpversion.h
|
||||
|
||||
* configure.in: changed accordingly.
|
||||
|
||||
* app/app_procs.c
|
||||
* app/main.c
|
||||
* app/gui/about-dialog.c
|
||||
* app/gui/splash.c
|
||||
* app/pdb/misc_cmds.c
|
||||
* tools/pdbgen/pdb/misc.pdb: fixed includes.
|
||||
|
||||
* plug-ins/bmp/bmpread.c
|
||||
* plug-ins/bmp/bmpwrite.c
|
||||
* plug-ins/common/gif.c
|
||||
* plug-ins/common/gifload.c
|
||||
* plug-ins/common/jpeg.c
|
||||
* plug-ins/common/newsprint.c
|
||||
* plug-ins/common/ps.c
|
||||
* plug-ins/common/tiff.c
|
||||
* plug-ins/gdyntext/gdyntextcompat.h
|
||||
* plug-ins/gimpressionist/gimpressionist.c
|
||||
* plug-ins/perl/Gimp.xs
|
||||
* plug-ins/perl/Gimp/Lib.xs
|
||||
* plug-ins/pygimp/gimpmodule.c
|
||||
* tools/gimp-remote.c: removed all #ifdef GIMP_HAVE_BLAH
|
||||
conditionals as they are broken anyway since we changed all
|
||||
plug-ins with perl scripts shortly before 1.2. Also, refering to
|
||||
intermediate unstable releases is evil.
|
||||
|
||||
2001-05-21 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/app_procs.c
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimp/gimpfeatures.h"
|
||||
|
||||
#include "core/core-types.h"
|
||||
#include "tools/tools-types.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
#include "libgimp/gimpfeatures.h"
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
#include "libgimp/gimpfeatures.h"
|
||||
#include "libgimpmath/gimpmath.h"
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimp/gimpfeatures.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "apptypes.h"
|
||||
|
|
|
@ -40,8 +40,6 @@
|
|||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
#include "libgimp/gimpfeatures.h"
|
||||
|
||||
#include "apptypes.h"
|
||||
|
||||
#include "appenv.h"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include "app_procs.h"
|
||||
|
||||
#include "libgimp/gimpfeatures.h"
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
static ProcRecord version_proc;
|
||||
static ProcRecord quit_proc;
|
||||
|
|
|
@ -781,9 +781,9 @@ gimptool-1.4
|
|||
gimptool.1
|
||||
gimp-remote.1
|
||||
gimp.spec
|
||||
libgimp/gimpfeatures.h
|
||||
libgimp/Makefile
|
||||
libgimp/makefile.mingw
|
||||
libgimpbase/gimpversion.h
|
||||
libgimpbase/Makefile
|
||||
libgimpbase/makefile.mingw
|
||||
libgimpcolor/Makefile
|
||||
|
|
|
@ -6,4 +6,3 @@ _libs
|
|||
.libs
|
||||
.deps
|
||||
*.la
|
||||
gimpfeatures.h
|
||||
|
|
|
@ -17,7 +17,6 @@ INCLUDES = \
|
|||
-I$(includedir)
|
||||
|
||||
EXTRA_DIST = \
|
||||
gimpfeatures.h.in \
|
||||
makefile.mingw \
|
||||
makefile.mingw.in \
|
||||
makefile.msc \
|
||||
|
@ -93,11 +92,6 @@ PDB_WRAPPERS_H = \
|
|||
gimpundo_pdb.h \
|
||||
gimpunit_pdb.h
|
||||
|
||||
# help `make' along by giving another name for the file, which it knows
|
||||
# how to build
|
||||
../libgimp/gimpfeatures.h: gimpfeatures.h
|
||||
@:
|
||||
|
||||
libgimp_1_3_la_SOURCES = \
|
||||
gimp.c \
|
||||
gimp.h \
|
||||
|
@ -153,7 +147,6 @@ gimpinclude_HEADERS = \
|
|||
gimpchannel.h \
|
||||
gimpdrawable.h \
|
||||
gimpenums.h \
|
||||
gimpfeatures.h \
|
||||
gimpgradientselect.h \
|
||||
gimpimage.h \
|
||||
gimplayer.h \
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
|
||||
#include <libgimp/gimpchannel.h>
|
||||
#include <libgimp/gimpdrawable.h>
|
||||
#include <libgimp/gimpfeatures.h>
|
||||
#include <libgimp/gimpgradientselect.h>
|
||||
#include <libgimp/gimpimage.h>
|
||||
#include <libgimp/gimplayer.h>
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#ifndef __GIMP_FEATURES_H__
|
||||
#define __GIMP_FEATURES_H__
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GIMP_MAJOR_VERSION (@GIMP_MAJOR_VERSION@)
|
||||
#define GIMP_MINOR_VERSION (@GIMP_MINOR_VERSION@)
|
||||
#define GIMP_MICRO_VERSION (@GIMP_MICRO_VERSION@)
|
||||
#define GIMP_VERSION "@GIMP_VERSION@"
|
||||
#define GIMP_CHECK_VERSION(major, minor, micro) \
|
||||
(GIMP_MAJOR_VERSION > (major) || \
|
||||
(GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION > (minor)) || \
|
||||
(GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION == (minor) && \
|
||||
GIMP_MICRO_VERSION >= (micro)))
|
||||
|
||||
#define GIMP_HAVE_PROCEDURAL_DB_GET_DATA_SIZE 1-1-0
|
||||
#define GIMP_HAVE_PARASITES 1-1-0
|
||||
#define GIMP_HAVE_RESOLUTION_INFO 1-1-0
|
||||
#define GIMP_HAVE_DESTROY_PARAMDEFS 1-1-0
|
||||
|
||||
#define GIMP_HAVE_FEATURES_1_1_5 1-1-5
|
||||
|
||||
#define GIMP_HAVE_DEFAULT_DISPLAY 1-1-5
|
||||
#define GIMP_HAVE_PIXEL_RGNS_REGISTER2 1-1-5
|
||||
|
||||
#define GIMP_HAVE_NEW_ENUMS 1-1-10
|
||||
|
||||
#define GIMP_HAVE_EXPORT 1-1-10
|
||||
|
||||
#define GIMP_HAVE_SYSCONFDIR 1-1-28
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __GIMP_FEATURES_H__ */
|
|
@ -6,3 +6,4 @@ _libs
|
|||
.libs
|
||||
.deps
|
||||
*.la
|
||||
gimpversion.h
|
||||
|
|
|
@ -17,6 +17,7 @@ INCLUDES = \
|
|||
-I$(includedir)
|
||||
|
||||
EXTRA_DIST = \
|
||||
gimpversion.h.in \
|
||||
makefile.mingw \
|
||||
makefile.mingw.in \
|
||||
makefile.msc \
|
||||
|
@ -24,6 +25,11 @@ EXTRA_DIST = \
|
|||
|
||||
lib_LTLIBRARIES = libgimpbase-1.3.la
|
||||
|
||||
# help `make' along by giving another name for the file, which it knows
|
||||
# how to build
|
||||
../libgimpbase/gimpversion.h: gimpversion.h
|
||||
@:
|
||||
|
||||
libgimpbase_1_3_la_SOURCES = \
|
||||
gimpbase.h \
|
||||
gimpbasetypes.h \
|
||||
|
@ -41,6 +47,7 @@ libgimpbase_1_3_la_SOURCES = \
|
|||
gimpprotocol.c \
|
||||
gimpprotocol.h \
|
||||
gimpunit.h \
|
||||
gimpversion.h \
|
||||
gimpwire.c \
|
||||
gimpwire.h
|
||||
|
||||
|
@ -53,7 +60,8 @@ libgimpbaseinclude_HEADERS = \
|
|||
gimputils.h \
|
||||
gimpparasite.h \
|
||||
gimpparasiteio.h \
|
||||
gimpunit.h
|
||||
gimpunit.h \
|
||||
gimpversion.h
|
||||
|
||||
libgimpbase_1_3_la_LDFLAGS = \
|
||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -28,6 +28,7 @@
|
|||
#include <libgimpbase/gimpparasite.h>
|
||||
#include <libgimpbase/gimpunit.h>
|
||||
#include <libgimpbase/gimputils.h>
|
||||
#include <libgimpbase/gimpversion.h>
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#include <libgimpbase/gimpsignal.h>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
*
|
||||
* This library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#ifndef __GIMP_FEATURES_H__
|
||||
#define __GIMP_FEATURES_H__
|
||||
|
||||
#ifndef __GIMP_VERSION_H__
|
||||
#define __GIMP_VERSION_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -35,25 +35,9 @@ extern "C" {
|
|||
(GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION == (minor) && \
|
||||
GIMP_MICRO_VERSION >= (micro)))
|
||||
|
||||
#define GIMP_HAVE_PROCEDURAL_DB_GET_DATA_SIZE 1-1-0
|
||||
#define GIMP_HAVE_PARASITES 1-1-0
|
||||
#define GIMP_HAVE_RESOLUTION_INFO 1-1-0
|
||||
#define GIMP_HAVE_DESTROY_PARAMDEFS 1-1-0
|
||||
|
||||
#define GIMP_HAVE_FEATURES_1_1_5 1-1-5
|
||||
|
||||
#define GIMP_HAVE_DEFAULT_DISPLAY 1-1-5
|
||||
#define GIMP_HAVE_PIXEL_RGNS_REGISTER2 1-1-5
|
||||
|
||||
#define GIMP_HAVE_NEW_ENUMS 1-1-10
|
||||
|
||||
#define GIMP_HAVE_EXPORT 1-1-10
|
||||
|
||||
#define GIMP_HAVE_SYSCONFDIR 1-1-28
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __GIMP_FEATURES_H__ */
|
||||
#endif /* __GIMP_VERSION_H__ */
|
||||
|
|
|
@ -239,24 +239,22 @@ ReadBMP (gchar *name)
|
|||
rowbytes,
|
||||
Grey);
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
if (Bitmap_Head.biXPels > 0 && Bitmap_Head.biYPels > 0)
|
||||
{
|
||||
/* Fixed up from scott@asofyet's changes last year, njl195 */
|
||||
gdouble xresolution;
|
||||
gdouble yresolution;
|
||||
{
|
||||
/* Fixed up from scott@asofyet's changes last year, njl195 */
|
||||
gdouble xresolution;
|
||||
gdouble yresolution;
|
||||
|
||||
/* I don't agree with scott's feeling that Gimp should be
|
||||
* trying to "fix" metric resolution translations, in the
|
||||
* long term Gimp should be SI (metric) anyway, but we
|
||||
* haven't told the Americans that yet */
|
||||
/* I don't agree with scott's feeling that Gimp should be
|
||||
* trying to "fix" metric resolution translations, in the
|
||||
* long term Gimp should be SI (metric) anyway, but we
|
||||
* haven't told the Americans that yet */
|
||||
|
||||
xresolution = Bitmap_Head.biXPels * 0.0254;
|
||||
yresolution = Bitmap_Head.biYPels * 0.0254;
|
||||
xresolution = Bitmap_Head.biXPels * 0.0254;
|
||||
yresolution = Bitmap_Head.biYPels * 0.0254;
|
||||
|
||||
gimp_image_set_resolution (image_ID, xresolution, yresolution);
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
gimp_image_set_resolution (image_ID, xresolution, yresolution);
|
||||
}
|
||||
|
||||
return (image_ID);
|
||||
}
|
||||
|
|
|
@ -221,7 +221,6 @@ WriteBMP (gchar *filename,
|
|||
|
||||
Bitmap_Head.biSizeIm = SpZeile * rows;
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
{
|
||||
gdouble xresolution;
|
||||
gdouble yresolution;
|
||||
|
@ -243,10 +242,7 @@ WriteBMP (gchar *filename,
|
|||
Bitmap_Head.biYPels = (long int) yresolution * 100.0 / 2.54;
|
||||
}
|
||||
}
|
||||
#else /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
Bitmap_Head.biXPels = 1;
|
||||
Bitmap_Head.biYPels = 1;
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
if (BitsPerPixel < 24)
|
||||
Bitmap_Head.biClrUsed = colors;
|
||||
else
|
||||
|
|
|
@ -281,9 +281,7 @@
|
|||
|
||||
/* Does the version of GIMP we're compiling for support
|
||||
data attachments to images? ('Parasites') */
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
#define FACEHUGGERS aieee
|
||||
#endif
|
||||
/* PS: I know that technically facehuggers aren't parasites,
|
||||
the pupal-forms are. But facehuggers are ky00te. */
|
||||
|
||||
|
|
|
@ -85,9 +85,7 @@
|
|||
|
||||
/* Does the version of GIMP we're compiling for support
|
||||
data attachments to images? ('Parasites') */
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
#define FACEHUGGERS aieee
|
||||
#endif
|
||||
/* PS: I know that technically facehuggers aren't parasites,
|
||||
the pupal-forms are. But facehuggers are ky00te. */
|
||||
|
||||
|
|
|
@ -360,9 +360,7 @@ run (gchar *name,
|
|||
gint32 drawable_ID;
|
||||
gint32 orig_image_ID;
|
||||
gint32 display_ID = -1;
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
GimpParasite *parasite;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
gboolean err;
|
||||
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
|
||||
|
||||
|
@ -428,14 +426,13 @@ run (gchar *name,
|
|||
g_free (image_comment);
|
||||
image_comment = NULL;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
parasite = gimp_image_parasite_find (orig_image_ID, "gimp-comment");
|
||||
if (parasite)
|
||||
{
|
||||
image_comment = g_strdup (parasite->data);
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
if (!image_comment)
|
||||
image_comment = g_strdup (DEFAULT_COMMENT);
|
||||
|
||||
|
@ -455,7 +452,6 @@ run (gchar *name,
|
|||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* load up the previously used values */
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
|
@ -472,7 +468,6 @@ run (gchar *name,
|
|||
jsvals.preview = ((JpegSaveVals *)parasite->data)->preview;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* we start an undo_group and immediately freeze undo saving
|
||||
so that we can avoid sucking up tile cache with our unneeded
|
||||
|
@ -536,7 +531,7 @@ run (gchar *name,
|
|||
case GIMP_RUN_WITH_LAST_VALS:
|
||||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
if (parasite)
|
||||
|
@ -552,7 +547,6 @@ run (gchar *name,
|
|||
jsvals.preview = FALSE;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -587,7 +581,6 @@ run (gchar *name,
|
|||
gimp_image_delete (image_ID);
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* pw - now we need to change the defaults to be whatever
|
||||
* was used to save this image. Dump the old parasites
|
||||
* and add new ones. */
|
||||
|
@ -608,7 +601,6 @@ run (gchar *name,
|
|||
0, sizeof (jsvals), &jsvals);
|
||||
gimp_image_parasite_attach (orig_image_ID, parasite);
|
||||
gimp_parasite_free (parasite);
|
||||
#endif /* Have Parasites */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -718,11 +710,9 @@ load_image (gchar *filename,
|
|||
gint scanlines;
|
||||
gint i, start, end;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
JpegSaveVals local_save_vals;
|
||||
GimpParasite * volatile comment_parasite = NULL;
|
||||
GimpParasite * volatile vals_parasite = NULL;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* We set up the normal JPEG error routines. */
|
||||
cinfo.err = jpeg_std_error (&jerr.pub);
|
||||
|
@ -777,7 +767,6 @@ load_image (gchar *filename,
|
|||
* See libjpeg.doc for more info.
|
||||
*/
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
/* if we had any comments then make a parasite for them */
|
||||
|
@ -819,8 +808,6 @@ load_image (gchar *filename,
|
|||
sizeof (local_save_vals),
|
||||
&local_save_vals);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
|
||||
/* Step 4: set parameters for decompression */
|
||||
|
||||
|
@ -907,7 +894,6 @@ load_image (gchar *filename,
|
|||
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0,
|
||||
drawable->width, drawable->height, TRUE, FALSE);
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
/* Step 5.1: if the file had resolution information, set it on the image */
|
||||
if (!preview && cinfo.saw_JFIF_marker)
|
||||
{
|
||||
|
@ -945,7 +931,6 @@ load_image (gchar *filename,
|
|||
|
||||
gimp_image_set_resolution (image_ID, xresolution, yresolution);
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 6: while (scan lines remain to be read) */
|
||||
/* jpeg_read_scanlines(...); */
|
||||
|
@ -1042,7 +1027,6 @@ load_image (gchar *filename,
|
|||
/* pw - Last of all, attach the parasites (couldn't do it earlier -
|
||||
there was no image. */
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
if (comment_parasite)
|
||||
|
@ -1057,7 +1041,6 @@ load_image (gchar *filename,
|
|||
gimp_parasite_free (vals_parasite);
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
return image_ID;
|
||||
}
|
||||
|
@ -1352,7 +1335,6 @@ save_image (gchar *filename,
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
{
|
||||
gdouble xresolution;
|
||||
gdouble yresolution;
|
||||
|
@ -1382,7 +1364,6 @@ save_image (gchar *filename,
|
|||
cinfo.Y_density = yresolution;
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 4: Start compressor */
|
||||
|
||||
|
|
|
@ -1175,9 +1175,10 @@ newsprint_dialog (GimpDrawable *drawable)
|
|||
GtkWidget *frame;
|
||||
GtkWidget *table;
|
||||
GtkObject *adj;
|
||||
GSList *group = NULL;
|
||||
gint bpp;
|
||||
gint i;
|
||||
GSList *group = NULL;
|
||||
gint bpp;
|
||||
gint i;
|
||||
gdouble xres, yres;
|
||||
|
||||
gimp_ui_init ("newsprint", TRUE);
|
||||
|
||||
|
@ -1236,17 +1237,12 @@ newsprint_dialog (GimpDrawable *drawable)
|
|||
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
{
|
||||
double xres, yres;
|
||||
gimp_image_get_resolution (gimp_drawable_image_id( drawable->id),
|
||||
&xres, &yres);
|
||||
/* XXX hack: should really note both resolutions, and use
|
||||
* rectangular cells, not square cells. But I'm being lazy,
|
||||
* and the majority of the world works with xres == yres */
|
||||
pvals_ui.input_spi = xres;
|
||||
}
|
||||
#endif
|
||||
gimp_image_get_resolution (gimp_drawable_image_id( drawable->id),
|
||||
&xres, &yres);
|
||||
/* XXX hack: should really note both resolutions, and use
|
||||
* rectangular cells, not square cells. But I'm being lazy,
|
||||
* and the majority of the world works with xres == yres */
|
||||
pvals_ui.input_spi = xres;
|
||||
|
||||
st.input_spi =
|
||||
gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
|
||||
|
|
|
@ -597,8 +597,6 @@ query (void)
|
|||
"");
|
||||
}
|
||||
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
static void
|
||||
ps_set_save_size (PSSaveVals *vals,
|
||||
gint32 image_ID)
|
||||
|
@ -636,7 +634,6 @@ ps_set_save_size (PSSaveVals *vals,
|
|||
vals->width = iw;
|
||||
vals->height = ih;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
run (gchar *name,
|
||||
|
@ -751,9 +748,8 @@ run (gchar *name,
|
|||
if ((k >= 4) && (strcmp (param[3].data.d_string+k-4, ".eps") == 0))
|
||||
psvals.eps = 1;
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
ps_set_save_size (&psvals, orig_image_ID);
|
||||
#endif
|
||||
|
||||
/* First acquire information with a dialog */
|
||||
if (! save_dialog ())
|
||||
status = GIMP_PDB_CANCEL;
|
||||
|
@ -792,10 +788,9 @@ run (gchar *name,
|
|||
|
||||
if (status == GIMP_PDB_SUCCESS)
|
||||
{
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
if ((psvals.width == 0.0) || (psvals.height == 0.0))
|
||||
ps_set_save_size (&psvals, orig_image_ID);
|
||||
#endif
|
||||
|
||||
check_save_vals ();
|
||||
if (save_image (param[3].data.d_string, image_ID, drawable_ID))
|
||||
{
|
||||
|
@ -916,11 +911,11 @@ load_image (gchar *filename)
|
|||
{
|
||||
image_ID = load_ps (filename, page_count, ifp, llx, lly, urx, ury);
|
||||
if (image_ID == -1) break;
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
|
||||
gimp_image_set_resolution (image_ID,
|
||||
(double) plvals.resolution,
|
||||
(double) plvals.resolution);
|
||||
#endif
|
||||
|
||||
if (n_images == max_images)
|
||||
{
|
||||
nl = (gint32 *) g_realloc (image_list,
|
||||
|
|
|
@ -597,8 +597,6 @@ query (void)
|
|||
"");
|
||||
}
|
||||
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
static void
|
||||
ps_set_save_size (PSSaveVals *vals,
|
||||
gint32 image_ID)
|
||||
|
@ -636,7 +634,6 @@ ps_set_save_size (PSSaveVals *vals,
|
|||
vals->width = iw;
|
||||
vals->height = ih;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
run (gchar *name,
|
||||
|
@ -751,9 +748,8 @@ run (gchar *name,
|
|||
if ((k >= 4) && (strcmp (param[3].data.d_string+k-4, ".eps") == 0))
|
||||
psvals.eps = 1;
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
ps_set_save_size (&psvals, orig_image_ID);
|
||||
#endif
|
||||
|
||||
/* First acquire information with a dialog */
|
||||
if (! save_dialog ())
|
||||
status = GIMP_PDB_CANCEL;
|
||||
|
@ -792,10 +788,9 @@ run (gchar *name,
|
|||
|
||||
if (status == GIMP_PDB_SUCCESS)
|
||||
{
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
if ((psvals.width == 0.0) || (psvals.height == 0.0))
|
||||
ps_set_save_size (&psvals, orig_image_ID);
|
||||
#endif
|
||||
|
||||
check_save_vals ();
|
||||
if (save_image (param[3].data.d_string, image_ID, drawable_ID))
|
||||
{
|
||||
|
@ -916,11 +911,11 @@ load_image (gchar *filename)
|
|||
{
|
||||
image_ID = load_ps (filename, page_count, ifp, llx, lly, urx, ury);
|
||||
if (image_ID == -1) break;
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
|
||||
gimp_image_set_resolution (image_ID,
|
||||
(double) plvals.resolution,
|
||||
(double) plvals.resolution);
|
||||
#endif
|
||||
|
||||
if (n_images == max_images)
|
||||
{
|
||||
nl = (gint32 *) g_realloc (image_list,
|
||||
|
|
|
@ -246,9 +246,7 @@ run (gchar *name,
|
|||
static GimpParam values[2];
|
||||
GimpRunModeType run_mode;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
GimpParasite *parasite;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
gint32 image;
|
||||
gint32 drawable;
|
||||
gint32 orig_image;
|
||||
|
@ -307,12 +305,10 @@ run (gchar *name,
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
parasite = gimp_image_parasite_find (orig_image, "gimp-comment");
|
||||
if (parasite)
|
||||
image_comment = g_strdup (parasite->data);
|
||||
gimp_parasite_free (parasite);
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
if (!image_comment)
|
||||
image_comment = g_strdup (DEFAULT_COMMENT);
|
||||
|
@ -323,7 +319,6 @@ run (gchar *name,
|
|||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_tiff_save", &tsvals);
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
parasite = gimp_image_parasite_find (orig_image, "tiff-save-options");
|
||||
if (parasite)
|
||||
{
|
||||
|
@ -331,7 +326,6 @@ run (gchar *name,
|
|||
((TiffSaveVals *) parasite->data)->compression;
|
||||
}
|
||||
gimp_parasite_free (parasite);
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* First acquire information with a dialog */
|
||||
if (! save_dialog ())
|
||||
|
@ -363,7 +357,6 @@ run (gchar *name,
|
|||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_tiff_save", &tsvals);
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
parasite = gimp_image_parasite_find (orig_image, "tiff-save-options");
|
||||
if (parasite)
|
||||
{
|
||||
|
@ -371,7 +364,6 @@ run (gchar *name,
|
|||
((TiffSaveVals *) parasite->data)->compression;
|
||||
}
|
||||
gimp_parasite_free (parasite);
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -433,9 +425,7 @@ load_image (gchar *filename)
|
|||
gchar *name;
|
||||
|
||||
TiffSaveVals save_vals;
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
GimpParasite *parasite;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
guint16 tmp;
|
||||
#ifdef TIFFTAG_ICCPROFILE
|
||||
uint32 profile_size;
|
||||
|
@ -541,12 +531,10 @@ load_image (gchar *filename)
|
|||
/* If TIFFTAG_ICCPROFILE is defined we are dealing with a libtiff version
|
||||
* that can handle ICC profiles. Otherwise just ignore this section. */
|
||||
if (TIFFGetField (tif, TIFFTAG_ICCPROFILE, &profile_size, &icc_profile)) {
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
parasite = gimp_parasite_new("icc-profile", 0,
|
||||
profile_size, icc_profile);
|
||||
gimp_image_parasite_attach(image, parasite);
|
||||
gimp_parasite_free(parasite);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -555,18 +543,15 @@ load_image (gchar *filename)
|
|||
save_vals.compression = COMPRESSION_NONE;
|
||||
else
|
||||
save_vals.compression = tmp;
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
|
||||
parasite = gimp_parasite_new ("tiff-save-options", 0,
|
||||
sizeof (save_vals), &save_vals);
|
||||
gimp_image_parasite_attach (image, parasite);
|
||||
gimp_parasite_free (parasite);
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
|
||||
/* Attach a parasite containing the image description. Pretend to
|
||||
* be a gimp comment so other plugins will use this description as
|
||||
* an image comment where appropriate. */
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
{
|
||||
char *img_desc;
|
||||
|
||||
|
@ -585,10 +570,8 @@ load_image (gchar *filename)
|
|||
gimp_parasite_free (parasite);
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* any resolution info in the file? */
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
{
|
||||
gfloat xres = 72.0, yres = 72.0;
|
||||
gushort read_unit;
|
||||
|
@ -656,8 +639,6 @@ load_image (gchar *filename)
|
|||
should feel free to shoot the author of the broken program
|
||||
that produced the damaged TIFF file in the first place. */
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
|
||||
/* Install colormap for INDEXED images only */
|
||||
if (image_type == GIMP_INDEXED)
|
||||
|
@ -1424,7 +1405,6 @@ save_image (gchar *filename,
|
|||
/* TIFFSetField( tif, TIFFTAG_STRIPBYTECOUNTS, rows / rowsperstrip ); */
|
||||
TIFFSetField (tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
/* resolution fields */
|
||||
{
|
||||
gdouble xresolution;
|
||||
|
@ -1456,12 +1436,10 @@ save_image (gchar *filename,
|
|||
TIFFSetField (tif, TIFFTAG_RESOLUTIONUNIT, save_unit);
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* do we have a comment? If so, create a new parasite to hold it,
|
||||
* and attach it to the image. The attach function automatically
|
||||
* detaches a previous incarnation of the parasite. */
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (image_comment && *image_comment != '\000')
|
||||
{
|
||||
GimpParasite *parasite;
|
||||
|
@ -1473,10 +1451,8 @@ save_image (gchar *filename,
|
|||
gimp_image_parasite_attach (orig_image, parasite);
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* do we have an ICC profile? If so, write it to the TIFF file */
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
#ifdef TIFFTAG_ICCPROFILE
|
||||
{
|
||||
GimpParasite *parasite;
|
||||
|
@ -1493,7 +1469,6 @@ save_image (gchar *filename,
|
|||
gimp_parasite_free(parasite);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (drawable_type == GIMP_INDEXED_IMAGE)
|
||||
|
|
|
@ -62,13 +62,6 @@ typedef enum
|
|||
} GDTCompatBlock;
|
||||
|
||||
|
||||
/* gimp-1.1.14+ function names reorganization forgotten something */
|
||||
#if defined(GIMP_HAVE_PARASITES) && GIMP_MINOR_VERSION < 2 && GIMP_MICRO_VERSION < 14
|
||||
# warning Replacing missing function 'gimp_drawable_parasite_find'
|
||||
# define gimp_drawable_parasite_find gimp_drawable_parasite_find
|
||||
#endif
|
||||
|
||||
|
||||
gboolean gdt_compat_load(GdtVals *data);
|
||||
|
||||
#endif /* _GDYNTEXTCOMPAT_H_ */
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
||||
#ifndef GIMP_CHECK_VERSION
|
||||
#define GIMP_CHECK_VERSION(a,b,c) 0
|
||||
#endif
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
# ifndef S_ISDIR
|
||||
# define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
|
||||
|
@ -54,7 +50,6 @@ GList * parsepath (void)
|
|||
if (lastpath)
|
||||
return lastpath;
|
||||
|
||||
#if GIMP_CHECK_VERSION(1, 1, 0)
|
||||
gimpdatasubdir = g_strconcat (gimp_data_directory (),
|
||||
G_DIR_SEPARATOR_S,
|
||||
"gimpressionist",
|
||||
|
@ -67,11 +62,6 @@ GList * parsepath (void)
|
|||
gimpdatasubdir,
|
||||
NULL);
|
||||
|
||||
#else
|
||||
defaultpath = DEFAULTPATH;
|
||||
gimpdatasubdir = strchr (defaultpath, ':') + 1;
|
||||
#endif
|
||||
|
||||
if (standalone)
|
||||
tmps = g_strdup (defaultpath);
|
||||
else
|
||||
|
@ -85,16 +75,12 @@ GList * parsepath (void)
|
|||
{
|
||||
/* No gimpressionist-path parameter,
|
||||
* and the default doesn't exist */
|
||||
#if GIMP_CHECK_VERSION(1, 1, 0)
|
||||
g_message( "*** Warning ***\n"
|
||||
"It is highly recommended to add\n"
|
||||
" (gimpressionist-path \"${gimp_dir}" G_DIR_SEPARATOR_S "gimpressionist"
|
||||
G_SEARCHPATH_SEPARATOR_S
|
||||
"${gimp_data_dir}" G_DIR_SEPARATOR_S "gimpressionist\")\n"
|
||||
"(or similar) to your gimprc file.\n");
|
||||
#else
|
||||
g_message( _("*** Warning ***\nIt is highly recommended to add\n (gimpressionist-path \"%s\")\n(or similar) to your gimprc file.\n"), defaultpath);
|
||||
#endif
|
||||
}
|
||||
tmps = g_strdup (defaultpath);
|
||||
}
|
||||
|
|
|
@ -360,9 +360,7 @@ run (gchar *name,
|
|||
gint32 drawable_ID;
|
||||
gint32 orig_image_ID;
|
||||
gint32 display_ID = -1;
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
GimpParasite *parasite;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
gboolean err;
|
||||
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
|
||||
|
||||
|
@ -428,14 +426,13 @@ run (gchar *name,
|
|||
g_free (image_comment);
|
||||
image_comment = NULL;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
parasite = gimp_image_parasite_find (orig_image_ID, "gimp-comment");
|
||||
if (parasite)
|
||||
{
|
||||
image_comment = g_strdup (parasite->data);
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
if (!image_comment)
|
||||
image_comment = g_strdup (DEFAULT_COMMENT);
|
||||
|
||||
|
@ -455,7 +452,6 @@ run (gchar *name,
|
|||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* load up the previously used values */
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
|
@ -472,7 +468,6 @@ run (gchar *name,
|
|||
jsvals.preview = ((JpegSaveVals *)parasite->data)->preview;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* we start an undo_group and immediately freeze undo saving
|
||||
so that we can avoid sucking up tile cache with our unneeded
|
||||
|
@ -536,7 +531,7 @@ run (gchar *name,
|
|||
case GIMP_RUN_WITH_LAST_VALS:
|
||||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
if (parasite)
|
||||
|
@ -552,7 +547,6 @@ run (gchar *name,
|
|||
jsvals.preview = FALSE;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -587,7 +581,6 @@ run (gchar *name,
|
|||
gimp_image_delete (image_ID);
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* pw - now we need to change the defaults to be whatever
|
||||
* was used to save this image. Dump the old parasites
|
||||
* and add new ones. */
|
||||
|
@ -608,7 +601,6 @@ run (gchar *name,
|
|||
0, sizeof (jsvals), &jsvals);
|
||||
gimp_image_parasite_attach (orig_image_ID, parasite);
|
||||
gimp_parasite_free (parasite);
|
||||
#endif /* Have Parasites */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -718,11 +710,9 @@ load_image (gchar *filename,
|
|||
gint scanlines;
|
||||
gint i, start, end;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
JpegSaveVals local_save_vals;
|
||||
GimpParasite * volatile comment_parasite = NULL;
|
||||
GimpParasite * volatile vals_parasite = NULL;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* We set up the normal JPEG error routines. */
|
||||
cinfo.err = jpeg_std_error (&jerr.pub);
|
||||
|
@ -777,7 +767,6 @@ load_image (gchar *filename,
|
|||
* See libjpeg.doc for more info.
|
||||
*/
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
/* if we had any comments then make a parasite for them */
|
||||
|
@ -819,8 +808,6 @@ load_image (gchar *filename,
|
|||
sizeof (local_save_vals),
|
||||
&local_save_vals);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
|
||||
/* Step 4: set parameters for decompression */
|
||||
|
||||
|
@ -907,7 +894,6 @@ load_image (gchar *filename,
|
|||
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0,
|
||||
drawable->width, drawable->height, TRUE, FALSE);
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
/* Step 5.1: if the file had resolution information, set it on the image */
|
||||
if (!preview && cinfo.saw_JFIF_marker)
|
||||
{
|
||||
|
@ -945,7 +931,6 @@ load_image (gchar *filename,
|
|||
|
||||
gimp_image_set_resolution (image_ID, xresolution, yresolution);
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 6: while (scan lines remain to be read) */
|
||||
/* jpeg_read_scanlines(...); */
|
||||
|
@ -1042,7 +1027,6 @@ load_image (gchar *filename,
|
|||
/* pw - Last of all, attach the parasites (couldn't do it earlier -
|
||||
there was no image. */
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
if (comment_parasite)
|
||||
|
@ -1057,7 +1041,6 @@ load_image (gchar *filename,
|
|||
gimp_parasite_free (vals_parasite);
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
return image_ID;
|
||||
}
|
||||
|
@ -1352,7 +1335,6 @@ save_image (gchar *filename,
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
{
|
||||
gdouble xresolution;
|
||||
gdouble yresolution;
|
||||
|
@ -1382,7 +1364,6 @@ save_image (gchar *filename,
|
|||
cinfo.Y_density = yresolution;
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 4: Start compressor */
|
||||
|
||||
|
|
|
@ -360,9 +360,7 @@ run (gchar *name,
|
|||
gint32 drawable_ID;
|
||||
gint32 orig_image_ID;
|
||||
gint32 display_ID = -1;
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
GimpParasite *parasite;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
gboolean err;
|
||||
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
|
||||
|
||||
|
@ -428,14 +426,13 @@ run (gchar *name,
|
|||
g_free (image_comment);
|
||||
image_comment = NULL;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
parasite = gimp_image_parasite_find (orig_image_ID, "gimp-comment");
|
||||
if (parasite)
|
||||
{
|
||||
image_comment = g_strdup (parasite->data);
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
if (!image_comment)
|
||||
image_comment = g_strdup (DEFAULT_COMMENT);
|
||||
|
||||
|
@ -455,7 +452,6 @@ run (gchar *name,
|
|||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* load up the previously used values */
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
|
@ -472,7 +468,6 @@ run (gchar *name,
|
|||
jsvals.preview = ((JpegSaveVals *)parasite->data)->preview;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* we start an undo_group and immediately freeze undo saving
|
||||
so that we can avoid sucking up tile cache with our unneeded
|
||||
|
@ -536,7 +531,7 @@ run (gchar *name,
|
|||
case GIMP_RUN_WITH_LAST_VALS:
|
||||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
if (parasite)
|
||||
|
@ -552,7 +547,6 @@ run (gchar *name,
|
|||
jsvals.preview = FALSE;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -587,7 +581,6 @@ run (gchar *name,
|
|||
gimp_image_delete (image_ID);
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* pw - now we need to change the defaults to be whatever
|
||||
* was used to save this image. Dump the old parasites
|
||||
* and add new ones. */
|
||||
|
@ -608,7 +601,6 @@ run (gchar *name,
|
|||
0, sizeof (jsvals), &jsvals);
|
||||
gimp_image_parasite_attach (orig_image_ID, parasite);
|
||||
gimp_parasite_free (parasite);
|
||||
#endif /* Have Parasites */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -718,11 +710,9 @@ load_image (gchar *filename,
|
|||
gint scanlines;
|
||||
gint i, start, end;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
JpegSaveVals local_save_vals;
|
||||
GimpParasite * volatile comment_parasite = NULL;
|
||||
GimpParasite * volatile vals_parasite = NULL;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* We set up the normal JPEG error routines. */
|
||||
cinfo.err = jpeg_std_error (&jerr.pub);
|
||||
|
@ -777,7 +767,6 @@ load_image (gchar *filename,
|
|||
* See libjpeg.doc for more info.
|
||||
*/
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
/* if we had any comments then make a parasite for them */
|
||||
|
@ -819,8 +808,6 @@ load_image (gchar *filename,
|
|||
sizeof (local_save_vals),
|
||||
&local_save_vals);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
|
||||
/* Step 4: set parameters for decompression */
|
||||
|
||||
|
@ -907,7 +894,6 @@ load_image (gchar *filename,
|
|||
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0,
|
||||
drawable->width, drawable->height, TRUE, FALSE);
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
/* Step 5.1: if the file had resolution information, set it on the image */
|
||||
if (!preview && cinfo.saw_JFIF_marker)
|
||||
{
|
||||
|
@ -945,7 +931,6 @@ load_image (gchar *filename,
|
|||
|
||||
gimp_image_set_resolution (image_ID, xresolution, yresolution);
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 6: while (scan lines remain to be read) */
|
||||
/* jpeg_read_scanlines(...); */
|
||||
|
@ -1042,7 +1027,6 @@ load_image (gchar *filename,
|
|||
/* pw - Last of all, attach the parasites (couldn't do it earlier -
|
||||
there was no image. */
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
if (comment_parasite)
|
||||
|
@ -1057,7 +1041,6 @@ load_image (gchar *filename,
|
|||
gimp_parasite_free (vals_parasite);
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
return image_ID;
|
||||
}
|
||||
|
@ -1352,7 +1335,6 @@ save_image (gchar *filename,
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
{
|
||||
gdouble xresolution;
|
||||
gdouble yresolution;
|
||||
|
@ -1382,7 +1364,6 @@ save_image (gchar *filename,
|
|||
cinfo.Y_density = yresolution;
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 4: Start compressor */
|
||||
|
||||
|
|
|
@ -360,9 +360,7 @@ run (gchar *name,
|
|||
gint32 drawable_ID;
|
||||
gint32 orig_image_ID;
|
||||
gint32 display_ID = -1;
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
GimpParasite *parasite;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
gboolean err;
|
||||
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
|
||||
|
||||
|
@ -428,14 +426,13 @@ run (gchar *name,
|
|||
g_free (image_comment);
|
||||
image_comment = NULL;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
parasite = gimp_image_parasite_find (orig_image_ID, "gimp-comment");
|
||||
if (parasite)
|
||||
{
|
||||
image_comment = g_strdup (parasite->data);
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
if (!image_comment)
|
||||
image_comment = g_strdup (DEFAULT_COMMENT);
|
||||
|
||||
|
@ -455,7 +452,6 @@ run (gchar *name,
|
|||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* load up the previously used values */
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
|
@ -472,7 +468,6 @@ run (gchar *name,
|
|||
jsvals.preview = ((JpegSaveVals *)parasite->data)->preview;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* we start an undo_group and immediately freeze undo saving
|
||||
so that we can avoid sucking up tile cache with our unneeded
|
||||
|
@ -536,7 +531,7 @@ run (gchar *name,
|
|||
case GIMP_RUN_WITH_LAST_VALS:
|
||||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
if (parasite)
|
||||
|
@ -552,7 +547,6 @@ run (gchar *name,
|
|||
jsvals.preview = FALSE;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -587,7 +581,6 @@ run (gchar *name,
|
|||
gimp_image_delete (image_ID);
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* pw - now we need to change the defaults to be whatever
|
||||
* was used to save this image. Dump the old parasites
|
||||
* and add new ones. */
|
||||
|
@ -608,7 +601,6 @@ run (gchar *name,
|
|||
0, sizeof (jsvals), &jsvals);
|
||||
gimp_image_parasite_attach (orig_image_ID, parasite);
|
||||
gimp_parasite_free (parasite);
|
||||
#endif /* Have Parasites */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -718,11 +710,9 @@ load_image (gchar *filename,
|
|||
gint scanlines;
|
||||
gint i, start, end;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
JpegSaveVals local_save_vals;
|
||||
GimpParasite * volatile comment_parasite = NULL;
|
||||
GimpParasite * volatile vals_parasite = NULL;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* We set up the normal JPEG error routines. */
|
||||
cinfo.err = jpeg_std_error (&jerr.pub);
|
||||
|
@ -777,7 +767,6 @@ load_image (gchar *filename,
|
|||
* See libjpeg.doc for more info.
|
||||
*/
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
/* if we had any comments then make a parasite for them */
|
||||
|
@ -819,8 +808,6 @@ load_image (gchar *filename,
|
|||
sizeof (local_save_vals),
|
||||
&local_save_vals);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
|
||||
/* Step 4: set parameters for decompression */
|
||||
|
||||
|
@ -907,7 +894,6 @@ load_image (gchar *filename,
|
|||
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0,
|
||||
drawable->width, drawable->height, TRUE, FALSE);
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
/* Step 5.1: if the file had resolution information, set it on the image */
|
||||
if (!preview && cinfo.saw_JFIF_marker)
|
||||
{
|
||||
|
@ -945,7 +931,6 @@ load_image (gchar *filename,
|
|||
|
||||
gimp_image_set_resolution (image_ID, xresolution, yresolution);
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 6: while (scan lines remain to be read) */
|
||||
/* jpeg_read_scanlines(...); */
|
||||
|
@ -1042,7 +1027,6 @@ load_image (gchar *filename,
|
|||
/* pw - Last of all, attach the parasites (couldn't do it earlier -
|
||||
there was no image. */
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
if (comment_parasite)
|
||||
|
@ -1057,7 +1041,6 @@ load_image (gchar *filename,
|
|||
gimp_parasite_free (vals_parasite);
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
return image_ID;
|
||||
}
|
||||
|
@ -1352,7 +1335,6 @@ save_image (gchar *filename,
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
{
|
||||
gdouble xresolution;
|
||||
gdouble yresolution;
|
||||
|
@ -1382,7 +1364,6 @@ save_image (gchar *filename,
|
|||
cinfo.Y_density = yresolution;
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 4: Start compressor */
|
||||
|
||||
|
|
|
@ -360,9 +360,7 @@ run (gchar *name,
|
|||
gint32 drawable_ID;
|
||||
gint32 orig_image_ID;
|
||||
gint32 display_ID = -1;
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
GimpParasite *parasite;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
gboolean err;
|
||||
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
|
||||
|
||||
|
@ -428,14 +426,13 @@ run (gchar *name,
|
|||
g_free (image_comment);
|
||||
image_comment = NULL;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
parasite = gimp_image_parasite_find (orig_image_ID, "gimp-comment");
|
||||
if (parasite)
|
||||
{
|
||||
image_comment = g_strdup (parasite->data);
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
if (!image_comment)
|
||||
image_comment = g_strdup (DEFAULT_COMMENT);
|
||||
|
||||
|
@ -455,7 +452,6 @@ run (gchar *name,
|
|||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* load up the previously used values */
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
|
@ -472,7 +468,6 @@ run (gchar *name,
|
|||
jsvals.preview = ((JpegSaveVals *)parasite->data)->preview;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* we start an undo_group and immediately freeze undo saving
|
||||
so that we can avoid sucking up tile cache with our unneeded
|
||||
|
@ -536,7 +531,7 @@ run (gchar *name,
|
|||
case GIMP_RUN_WITH_LAST_VALS:
|
||||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
if (parasite)
|
||||
|
@ -552,7 +547,6 @@ run (gchar *name,
|
|||
jsvals.preview = FALSE;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -587,7 +581,6 @@ run (gchar *name,
|
|||
gimp_image_delete (image_ID);
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* pw - now we need to change the defaults to be whatever
|
||||
* was used to save this image. Dump the old parasites
|
||||
* and add new ones. */
|
||||
|
@ -608,7 +601,6 @@ run (gchar *name,
|
|||
0, sizeof (jsvals), &jsvals);
|
||||
gimp_image_parasite_attach (orig_image_ID, parasite);
|
||||
gimp_parasite_free (parasite);
|
||||
#endif /* Have Parasites */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -718,11 +710,9 @@ load_image (gchar *filename,
|
|||
gint scanlines;
|
||||
gint i, start, end;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
JpegSaveVals local_save_vals;
|
||||
GimpParasite * volatile comment_parasite = NULL;
|
||||
GimpParasite * volatile vals_parasite = NULL;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* We set up the normal JPEG error routines. */
|
||||
cinfo.err = jpeg_std_error (&jerr.pub);
|
||||
|
@ -777,7 +767,6 @@ load_image (gchar *filename,
|
|||
* See libjpeg.doc for more info.
|
||||
*/
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
/* if we had any comments then make a parasite for them */
|
||||
|
@ -819,8 +808,6 @@ load_image (gchar *filename,
|
|||
sizeof (local_save_vals),
|
||||
&local_save_vals);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
|
||||
/* Step 4: set parameters for decompression */
|
||||
|
||||
|
@ -907,7 +894,6 @@ load_image (gchar *filename,
|
|||
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0,
|
||||
drawable->width, drawable->height, TRUE, FALSE);
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
/* Step 5.1: if the file had resolution information, set it on the image */
|
||||
if (!preview && cinfo.saw_JFIF_marker)
|
||||
{
|
||||
|
@ -945,7 +931,6 @@ load_image (gchar *filename,
|
|||
|
||||
gimp_image_set_resolution (image_ID, xresolution, yresolution);
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 6: while (scan lines remain to be read) */
|
||||
/* jpeg_read_scanlines(...); */
|
||||
|
@ -1042,7 +1027,6 @@ load_image (gchar *filename,
|
|||
/* pw - Last of all, attach the parasites (couldn't do it earlier -
|
||||
there was no image. */
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
if (comment_parasite)
|
||||
|
@ -1057,7 +1041,6 @@ load_image (gchar *filename,
|
|||
gimp_parasite_free (vals_parasite);
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
return image_ID;
|
||||
}
|
||||
|
@ -1352,7 +1335,6 @@ save_image (gchar *filename,
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
{
|
||||
gdouble xresolution;
|
||||
gdouble yresolution;
|
||||
|
@ -1382,7 +1364,6 @@ save_image (gchar *filename,
|
|||
cinfo.Y_density = yresolution;
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 4: Start compressor */
|
||||
|
||||
|
|
|
@ -360,9 +360,7 @@ run (gchar *name,
|
|||
gint32 drawable_ID;
|
||||
gint32 orig_image_ID;
|
||||
gint32 display_ID = -1;
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
GimpParasite *parasite;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
gboolean err;
|
||||
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
|
||||
|
||||
|
@ -428,14 +426,13 @@ run (gchar *name,
|
|||
g_free (image_comment);
|
||||
image_comment = NULL;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
parasite = gimp_image_parasite_find (orig_image_ID, "gimp-comment");
|
||||
if (parasite)
|
||||
{
|
||||
image_comment = g_strdup (parasite->data);
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
if (!image_comment)
|
||||
image_comment = g_strdup (DEFAULT_COMMENT);
|
||||
|
||||
|
@ -455,7 +452,6 @@ run (gchar *name,
|
|||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* load up the previously used values */
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
|
@ -472,7 +468,6 @@ run (gchar *name,
|
|||
jsvals.preview = ((JpegSaveVals *)parasite->data)->preview;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* we start an undo_group and immediately freeze undo saving
|
||||
so that we can avoid sucking up tile cache with our unneeded
|
||||
|
@ -536,7 +531,7 @@ run (gchar *name,
|
|||
case GIMP_RUN_WITH_LAST_VALS:
|
||||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
if (parasite)
|
||||
|
@ -552,7 +547,6 @@ run (gchar *name,
|
|||
jsvals.preview = FALSE;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -587,7 +581,6 @@ run (gchar *name,
|
|||
gimp_image_delete (image_ID);
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* pw - now we need to change the defaults to be whatever
|
||||
* was used to save this image. Dump the old parasites
|
||||
* and add new ones. */
|
||||
|
@ -608,7 +601,6 @@ run (gchar *name,
|
|||
0, sizeof (jsvals), &jsvals);
|
||||
gimp_image_parasite_attach (orig_image_ID, parasite);
|
||||
gimp_parasite_free (parasite);
|
||||
#endif /* Have Parasites */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -718,11 +710,9 @@ load_image (gchar *filename,
|
|||
gint scanlines;
|
||||
gint i, start, end;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
JpegSaveVals local_save_vals;
|
||||
GimpParasite * volatile comment_parasite = NULL;
|
||||
GimpParasite * volatile vals_parasite = NULL;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* We set up the normal JPEG error routines. */
|
||||
cinfo.err = jpeg_std_error (&jerr.pub);
|
||||
|
@ -777,7 +767,6 @@ load_image (gchar *filename,
|
|||
* See libjpeg.doc for more info.
|
||||
*/
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
/* if we had any comments then make a parasite for them */
|
||||
|
@ -819,8 +808,6 @@ load_image (gchar *filename,
|
|||
sizeof (local_save_vals),
|
||||
&local_save_vals);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
|
||||
/* Step 4: set parameters for decompression */
|
||||
|
||||
|
@ -907,7 +894,6 @@ load_image (gchar *filename,
|
|||
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0,
|
||||
drawable->width, drawable->height, TRUE, FALSE);
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
/* Step 5.1: if the file had resolution information, set it on the image */
|
||||
if (!preview && cinfo.saw_JFIF_marker)
|
||||
{
|
||||
|
@ -945,7 +931,6 @@ load_image (gchar *filename,
|
|||
|
||||
gimp_image_set_resolution (image_ID, xresolution, yresolution);
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 6: while (scan lines remain to be read) */
|
||||
/* jpeg_read_scanlines(...); */
|
||||
|
@ -1042,7 +1027,6 @@ load_image (gchar *filename,
|
|||
/* pw - Last of all, attach the parasites (couldn't do it earlier -
|
||||
there was no image. */
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
if (comment_parasite)
|
||||
|
@ -1057,7 +1041,6 @@ load_image (gchar *filename,
|
|||
gimp_parasite_free (vals_parasite);
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
return image_ID;
|
||||
}
|
||||
|
@ -1352,7 +1335,6 @@ save_image (gchar *filename,
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
{
|
||||
gdouble xresolution;
|
||||
gdouble yresolution;
|
||||
|
@ -1382,7 +1364,6 @@ save_image (gchar *filename,
|
|||
cinfo.Y_density = yresolution;
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 4: Start compressor */
|
||||
|
||||
|
|
|
@ -360,9 +360,7 @@ run (gchar *name,
|
|||
gint32 drawable_ID;
|
||||
gint32 orig_image_ID;
|
||||
gint32 display_ID = -1;
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
GimpParasite *parasite;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
gboolean err;
|
||||
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
|
||||
|
||||
|
@ -428,14 +426,13 @@ run (gchar *name,
|
|||
g_free (image_comment);
|
||||
image_comment = NULL;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
parasite = gimp_image_parasite_find (orig_image_ID, "gimp-comment");
|
||||
if (parasite)
|
||||
{
|
||||
image_comment = g_strdup (parasite->data);
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
if (!image_comment)
|
||||
image_comment = g_strdup (DEFAULT_COMMENT);
|
||||
|
||||
|
@ -455,7 +452,6 @@ run (gchar *name,
|
|||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* load up the previously used values */
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
|
@ -472,7 +468,6 @@ run (gchar *name,
|
|||
jsvals.preview = ((JpegSaveVals *)parasite->data)->preview;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* we start an undo_group and immediately freeze undo saving
|
||||
so that we can avoid sucking up tile cache with our unneeded
|
||||
|
@ -536,7 +531,7 @@ run (gchar *name,
|
|||
case GIMP_RUN_WITH_LAST_VALS:
|
||||
/* Possibly retrieve data */
|
||||
gimp_get_data ("file_jpeg_save", &jsvals);
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
if (parasite)
|
||||
|
@ -552,7 +547,6 @@ run (gchar *name,
|
|||
jsvals.preview = FALSE;
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -587,7 +581,6 @@ run (gchar *name,
|
|||
gimp_image_delete (image_ID);
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* pw - now we need to change the defaults to be whatever
|
||||
* was used to save this image. Dump the old parasites
|
||||
* and add new ones. */
|
||||
|
@ -608,7 +601,6 @@ run (gchar *name,
|
|||
0, sizeof (jsvals), &jsvals);
|
||||
gimp_image_parasite_attach (orig_image_ID, parasite);
|
||||
gimp_parasite_free (parasite);
|
||||
#endif /* Have Parasites */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -718,11 +710,9 @@ load_image (gchar *filename,
|
|||
gint scanlines;
|
||||
gint i, start, end;
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
JpegSaveVals local_save_vals;
|
||||
GimpParasite * volatile comment_parasite = NULL;
|
||||
GimpParasite * volatile vals_parasite = NULL;
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
/* We set up the normal JPEG error routines. */
|
||||
cinfo.err = jpeg_std_error (&jerr.pub);
|
||||
|
@ -777,7 +767,6 @@ load_image (gchar *filename,
|
|||
* See libjpeg.doc for more info.
|
||||
*/
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
/* if we had any comments then make a parasite for them */
|
||||
|
@ -819,8 +808,6 @@ load_image (gchar *filename,
|
|||
sizeof (local_save_vals),
|
||||
&local_save_vals);
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
|
||||
/* Step 4: set parameters for decompression */
|
||||
|
||||
|
@ -907,7 +894,6 @@ load_image (gchar *filename,
|
|||
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0,
|
||||
drawable->width, drawable->height, TRUE, FALSE);
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
/* Step 5.1: if the file had resolution information, set it on the image */
|
||||
if (!preview && cinfo.saw_JFIF_marker)
|
||||
{
|
||||
|
@ -945,7 +931,6 @@ load_image (gchar *filename,
|
|||
|
||||
gimp_image_set_resolution (image_ID, xresolution, yresolution);
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 6: while (scan lines remain to be read) */
|
||||
/* jpeg_read_scanlines(...); */
|
||||
|
@ -1042,7 +1027,6 @@ load_image (gchar *filename,
|
|||
/* pw - Last of all, attach the parasites (couldn't do it earlier -
|
||||
there was no image. */
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
if (!preview)
|
||||
{
|
||||
if (comment_parasite)
|
||||
|
@ -1057,7 +1041,6 @@ load_image (gchar *filename,
|
|||
gimp_parasite_free (vals_parasite);
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_PARASITES */
|
||||
|
||||
return image_ID;
|
||||
}
|
||||
|
@ -1352,7 +1335,6 @@ save_image (gchar *filename,
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
{
|
||||
gdouble xresolution;
|
||||
gdouble yresolution;
|
||||
|
@ -1382,7 +1364,6 @@ save_image (gchar *filename,
|
|||
cinfo.Y_density = yresolution;
|
||||
}
|
||||
}
|
||||
#endif /* GIMP_HAVE_RESOLUTION_INFO */
|
||||
|
||||
/* Step 4: Start compressor */
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#include "config.h"
|
||||
|
||||
#include <libgimp/gimp.h>
|
||||
#ifdef GIMP_HAVE_EXPORT
|
||||
#include <libgimp/gimpexport.h>
|
||||
#endif
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
|
@ -144,7 +142,7 @@ BOOT:
|
|||
#if HAVE_DIVIDE_MODE || IN_GIMP
|
||||
/*newCONSTSUB(stash,"GIMP_DIVIDE_MODE",newSViv(GIMP_DIVIDE_MODE));*/
|
||||
#endif
|
||||
#ifdef GIMP_HAVE_EXPORT
|
||||
|
||||
newCONSTSUB(stash,"EXPORT_CAN_HANDLE_RGB", newSViv(GIMP_EXPORT_CAN_HANDLE_RGB));
|
||||
newCONSTSUB(stash,"EXPORT_CAN_HANDLE_GRAY", newSViv(GIMP_EXPORT_CAN_HANDLE_GRAY));
|
||||
newCONSTSUB(stash,"EXPORT_CAN_HANDLE_INDEXED", newSViv(GIMP_EXPORT_CAN_HANDLE_INDEXED));
|
||||
|
@ -156,7 +154,6 @@ BOOT:
|
|||
newCONSTSUB(stash,"EXPORT_CANCEL", newSViv(GIMP_EXPORT_CANCEL));
|
||||
newCONSTSUB(stash,"EXPORT_IGNORE", newSViv(GIMP_EXPORT_CANCEL));
|
||||
newCONSTSUB(stash,"EXPORT_EXPORT", newSViv(GIMP_EXPORT_EXPORT));
|
||||
#endif
|
||||
}
|
||||
|
||||
MODULE = Gimp PACKAGE = Gimp::RAW
|
||||
|
|
|
@ -1087,50 +1087,6 @@ destroy_params (GimpParam *arg, int count)
|
|||
g_free (arg);
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_DESTROY_PARAMDEFS
|
||||
#define destroy_paramdefs gimp_destroy_paramdefs
|
||||
#else
|
||||
static void
|
||||
destroy_paramdefs (GimpParamDef *arg, int count)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
g_free (arg[i].name);
|
||||
g_free (arg[i].description);
|
||||
}
|
||||
|
||||
g_free (arg);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GIMP_HAVE_PROCEDURAL_DB_GET_DATA_SIZE
|
||||
#define get_data_size gimp_get_data_size
|
||||
#else
|
||||
static guint32
|
||||
get_data_size (gchar *id)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
int nreturn_vals;
|
||||
int length;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp_procedural_db_get_data",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, id,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
length = return_vals[1].data.d_int32;
|
||||
else
|
||||
length = 0;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return length;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void simple_perl_call (char *function, char *arg1)
|
||||
{
|
||||
dSP;
|
||||
|
@ -1191,7 +1147,7 @@ static void pii_run(char *name, int nparams, GimpParam *param, int *xnreturn_val
|
|||
g_free (proc_author);
|
||||
g_free (proc_copyright);
|
||||
g_free (proc_date);
|
||||
destroy_paramdefs (params, _nparams);
|
||||
gimp_destroy_paramdefs (params, _nparams);
|
||||
|
||||
PUSHMARK(SP);
|
||||
|
||||
|
@ -1267,7 +1223,7 @@ static void pii_run(char *name, int nparams, GimpParam *param, int *xnreturn_val
|
|||
err_msg = g_strdup_printf (__("plug-in returned %d more values than expected"), count);
|
||||
}
|
||||
|
||||
destroy_paramdefs (return_defs, nreturn_vals);
|
||||
gimp_destroy_paramdefs (return_defs, nreturn_vals);
|
||||
|
||||
PUTBACK;
|
||||
}
|
||||
|
@ -1441,8 +1397,8 @@ _gimp_procedure_available(proc_name)
|
|||
g_free (proc_author);
|
||||
g_free (proc_copyright);
|
||||
g_free (proc_date);
|
||||
destroy_paramdefs (params, nparams);
|
||||
destroy_paramdefs (return_vals, nreturn_vals);
|
||||
gimp_destroy_paramdefs (params, nparams);
|
||||
gimp_destroy_paramdefs (return_vals, nreturn_vals);
|
||||
RETVAL = TRUE;
|
||||
}
|
||||
else
|
||||
|
@ -1485,8 +1441,8 @@ gimp_procedural_db_proc_info(proc_name)
|
|||
PUSHs (newSVpv (proc_copyright,0)); g_free (proc_copyright);
|
||||
PUSHs (newSVpv (proc_date,0)); g_free (proc_date);
|
||||
PUSHs (newSViv (proc_type));
|
||||
PUSHs (newSV_paramdefs (params, nparams)); destroy_paramdefs (params, nparams);
|
||||
PUSHs (newSV_paramdefs (return_vals, nreturn_vals));destroy_paramdefs (return_vals, nreturn_vals);
|
||||
PUSHs (newSV_paramdefs (params, nparams)); gimp_destroy_paramdefs (params, nparams);
|
||||
PUSHs (newSV_paramdefs (return_vals, nreturn_vals));gimp_destroy_paramdefs (return_vals, nreturn_vals);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1631,8 +1587,8 @@ gimp_call_procedure (proc_name, ...)
|
|||
if (values)
|
||||
gimp_destroy_params (values, nreturn_vals);
|
||||
|
||||
destroy_paramdefs (params, nparams);
|
||||
destroy_paramdefs (return_vals, nreturn_vals);
|
||||
gimp_destroy_paramdefs (params, nparams);
|
||||
gimp_destroy_paramdefs (return_vals, nreturn_vals);
|
||||
|
||||
|
||||
if (croak_str[0])
|
||||
|
@ -1715,7 +1671,7 @@ gimp_get_data(id)
|
|||
SV *data;
|
||||
STRLEN dlen;
|
||||
|
||||
dlen = get_data_size (SvPV_nolen (id));
|
||||
dlen = gimp_get_data_size (SvPV_nolen (id));
|
||||
/* I count on dlen being zero if "id" doesn't exist. */
|
||||
data = newSVpv ("", 0);
|
||||
gimp_get_data (SvPV_nolen (id), SvGROW (data, dlen+1));
|
||||
|
@ -2289,13 +2245,9 @@ _gimp_progress_init (message)
|
|||
CODE:
|
||||
gimp_progress_init (message);
|
||||
|
||||
#ifdef GIMP_HAVE_DEFAULT_DISPLAY
|
||||
|
||||
DISPLAY
|
||||
gimp_default_display()
|
||||
|
||||
#endif
|
||||
|
||||
# functions using different calling conventions:
|
||||
#void
|
||||
#gimp_channel_get_color(channel_ID, red, green, blue)
|
||||
|
|
|
@ -37,14 +37,6 @@
|
|||
|
||||
static PyObject *ErrorObject;
|
||||
|
||||
#ifndef GIMP_CHECK_VERSION
|
||||
# define GIMP_CHECK_VERSION(major, minor, micro) \
|
||||
(GIMP_MAJOR_VERSION > (major) || \
|
||||
(GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION > (minor)) || \
|
||||
(GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION == (minor) && \
|
||||
GIMP_MICRO_VERSION >= (micro)))
|
||||
#endif
|
||||
|
||||
#ifndef PG_DEBUG
|
||||
# define PG_DEBUG 0
|
||||
#endif
|
||||
|
@ -158,7 +150,6 @@ static probject *newprobject(drwobject *drw, int, int, int, int, int, int);
|
|||
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
/* Declarations for objects of type GimpParasite */
|
||||
|
||||
typedef struct {
|
||||
|
@ -170,7 +161,6 @@ staticforward PyTypeObject Paratype;
|
|||
#define para_check(v) ((v)->ob_type == &Paratype)
|
||||
static paraobject *newparaobject(GimpParasite *para);
|
||||
|
||||
#endif
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
/* routines to convert between Python tuples and gimp GimpParam's */
|
||||
|
@ -422,13 +412,11 @@ GParam_to_tuple(int nparams, GimpParam *params) {
|
|||
PyTuple_SetItem(args, i, PyInt_FromLong(
|
||||
params[i].data.d_path));
|
||||
break;
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
case GIMP_PDB_PARASITE:
|
||||
PyTuple_SetItem(args, i,
|
||||
(PyObject *)newparaobject(gimp_parasite_copy(
|
||||
&(params[i].data.d_parasite))));
|
||||
break;
|
||||
#endif
|
||||
case GIMP_PDB_STATUS:
|
||||
PyTuple_SetItem(args, i, PyInt_FromLong(
|
||||
params[i].data.d_status));
|
||||
|
@ -649,11 +637,9 @@ tuple_to_GParam(PyObject *args, GimpParamDef *ptype, int nparams) {
|
|||
check(!PyInt_Check(item))
|
||||
ret[i].data.d_path = PyInt_AsLong(item);
|
||||
break;
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
case GIMP_PDB_PARASITE:
|
||||
/* can't do anything, since size of GimpParasite is not known */
|
||||
break;
|
||||
#endif
|
||||
case GIMP_PDB_STATUS:
|
||||
check(!PyInt_Check(item))
|
||||
ret[i].data.d_status = PyInt_AsLong(item);
|
||||
|
@ -944,19 +930,6 @@ newpfobject(name)
|
|||
return self;
|
||||
}
|
||||
|
||||
#ifndef GIMP_HAVE_DESTROY_PARAMDEFS
|
||||
static void
|
||||
gimp_destroy_paramdefs (GimpParamDef *paramdefs,
|
||||
int nparams)
|
||||
{
|
||||
while (nparams--) {
|
||||
g_free (paramdefs[nparams].name);
|
||||
g_free (paramdefs[nparams].description);
|
||||
}
|
||||
|
||||
g_free (paramdefs);
|
||||
}
|
||||
#endif
|
||||
static void
|
||||
pf_dealloc(self)
|
||||
pfobject *self;
|
||||
|
@ -1462,7 +1435,6 @@ img_set_component_visible(self, args)
|
|||
return Py_None;
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
static PyObject *
|
||||
img_parasite_find(self, args)
|
||||
imgobject *self;
|
||||
|
@ -1515,15 +1487,11 @@ img_parasite_detach(self, args)
|
|||
return Py_None;
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
/* gimp_image_set_resolution
|
||||
* gimp_image_get_resolution
|
||||
* gimp_set_unit
|
||||
* gimp_get_unit
|
||||
*/
|
||||
#endif
|
||||
#if GIMP_CHECK_VERSION(1,1,0)
|
||||
static PyObject *
|
||||
img_get_layer_by_tattoo(self, args)
|
||||
imgobject *self;
|
||||
|
@ -1619,7 +1587,6 @@ img_get_guide_position(self, args)
|
|||
return NULL;
|
||||
return PyInt_FromLong(gimp_image_get_guide_position(self->ID, guide));
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct PyMethodDef img_methods[] = {
|
||||
{"add_channel", (PyCFunction)img_add_channel, METH_VARARGS},
|
||||
|
@ -1643,13 +1610,10 @@ static struct PyMethodDef img_methods[] = {
|
|||
{"get_component_visible", (PyCFunction)img_get_component_visible, METH_VARARGS},
|
||||
{"set_component_active", (PyCFunction)img_set_component_active, METH_VARARGS},
|
||||
{"set_component_visible", (PyCFunction)img_set_component_visible, METH_VARARGS},
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
{"parasite_find", (PyCFunction)img_parasite_find, METH_VARARGS},
|
||||
{"parasite_attach", (PyCFunction)img_parasite_attach, METH_VARARGS},
|
||||
{"attach_new_parasite", (PyCFunction)img_attach_new_parasite,METH_VARARGS},
|
||||
{"parasite_detach", (PyCFunction)img_parasite_detach, METH_VARARGS},
|
||||
#endif
|
||||
#if GIMP_CHECK_VERSION(1,1,0)
|
||||
{"get_layer_by_tattoo",(PyCFunction)img_get_layer_by_tattoo,METH_VARARGS},
|
||||
{"get_channel_by_tattoo",(PyCFunction)img_get_channel_by_tattoo,METH_VARARGS},
|
||||
{"add_hguide", (PyCFunction)img_add_hguide, METH_VARARGS},
|
||||
|
@ -1658,7 +1622,6 @@ static struct PyMethodDef img_methods[] = {
|
|||
{"find_next_guide", (PyCFunction)img_find_next_guide, METH_VARARGS},
|
||||
{"get_guide_orientation",(PyCFunction)img_get_guide_orientation,METH_VARARGS},
|
||||
{"get_guide_position", (PyCFunction)img_get_guide_position, METH_VARARGS},
|
||||
#endif
|
||||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
@ -1701,22 +1664,14 @@ img_getattr(self, name)
|
|||
PyObject *ret;
|
||||
if (!strcmp(name, "__members__"))
|
||||
return Py_BuildValue(
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
"[ssssssssssss]",
|
||||
#else
|
||||
"[ssssssssss]",
|
||||
#endif
|
||||
"ID", "active_channel",
|
||||
"active_layer", "base_type", "channels", "cmap",
|
||||
"filename", "floating_selection",
|
||||
"height", "layers",
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
"resolution",
|
||||
#endif
|
||||
"selection",
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
"unit",
|
||||
#endif
|
||||
"width");
|
||||
if (!strcmp(name, "ID"))
|
||||
return PyInt_FromLong(self->ID);
|
||||
|
@ -1774,7 +1729,6 @@ img_getattr(self, name)
|
|||
if (!strcmp(name, "width"))
|
||||
return PyInt_FromLong(gimp_image_width(self->ID));
|
||||
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
if (!strcmp(name, "resolution")) {
|
||||
double xres, yres;
|
||||
gimp_image_get_resolution(self->ID, &xres, &yres);
|
||||
|
@ -1782,7 +1736,6 @@ img_getattr(self, name)
|
|||
}
|
||||
if (!strcmp(name, "unit"))
|
||||
return PyInt_FromLong(gimp_image_get_unit(self->ID));
|
||||
#endif
|
||||
|
||||
return Py_FindMethod(img_methods, (PyObject *)self, name);
|
||||
}
|
||||
|
@ -1830,7 +1783,6 @@ img_setattr(self, name, v)
|
|||
gimp_image_set_filename(self->ID, PyString_AsString(v));
|
||||
return 0;
|
||||
}
|
||||
#ifdef GIMP_HAVE_RESOLUTION_INFO
|
||||
if (!strcmp(name, "resolution")) {
|
||||
PyObject *xo, *yo;
|
||||
if (!PySequence_Check(v) ||
|
||||
|
@ -1849,7 +1801,6 @@ img_setattr(self, name, v)
|
|||
}
|
||||
gimp_image_set_unit(self->ID, PyInt_AsLong(v));
|
||||
}
|
||||
#endif
|
||||
if (!strcmp(name, "channels") || !strcmp(name, "layers") ||
|
||||
!strcmp(name, "selection") || !strcmp(name, "height") ||
|
||||
!strcmp(name, "base_type") || !strcmp(name, "width") ||
|
||||
|
@ -2092,7 +2043,6 @@ drw_get_pixel_rgn(self, args)
|
|||
dirty, shadow);
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
static PyObject *
|
||||
drw_parasite_find(self, args)
|
||||
drwobject *self;
|
||||
|
@ -2145,10 +2095,8 @@ drw_parasite_detach(self, args)
|
|||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* for inclusion with the methods of layer and channel objects */
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
#define drw_methods() \
|
||||
{"flush", (PyCFunction)drw_flush, METH_VARARGS}, \
|
||||
{"update", (PyCFunction)drw_update, METH_VARARGS}, \
|
||||
|
@ -2161,16 +2109,6 @@ drw_parasite_detach(self, args)
|
|||
{"parasite_attach", (PyCFunction)drw_parasite_attach, METH_VARARGS},\
|
||||
{"attach_new_parasite",(PyCFunction)drw_attach_new_parasite,METH_VARARGS},\
|
||||
{"parasite_detach", (PyCFunction)drw_parasite_detach, METH_VARARGS}
|
||||
#else
|
||||
#define drw_methods() \
|
||||
{"flush", (PyCFunction)drw_flush, METH_VARARGS}, \
|
||||
{"update", (PyCFunction)drw_update, METH_VARARGS}, \
|
||||
{"merge_shadow", (PyCFunction)drw_merge_shadow, METH_VARARGS}, \
|
||||
{"fill", (PyCFunction)drw_fill, METH_VARARGS}, \
|
||||
{"get_tile", (PyCFunction)drw_get_tile, METH_VARARGS}, \
|
||||
{"get_tile2", (PyCFunction)drw_get_tile2, METH_VARARGS}, \
|
||||
{"get_pixel_rgn", (PyCFunction)drw_get_pixel_rgn, METH_VARARGS}
|
||||
#endif
|
||||
/* ---------- */
|
||||
|
||||
|
||||
|
@ -2319,7 +2257,6 @@ lay_set_offsets(self, args)
|
|||
return Py_None;
|
||||
}
|
||||
|
||||
#if GIMP_CHECK_VERSION(1,1,0)
|
||||
static PyObject *
|
||||
lay_get_tattoo(self, args)
|
||||
layobject *self;
|
||||
|
@ -2329,7 +2266,6 @@ lay_get_tattoo(self, args)
|
|||
return NULL;
|
||||
return PyInt_FromLong(gimp_layer_get_tattoo(self->ID));
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct PyMethodDef lay_methods[] = {
|
||||
{"copy", (PyCFunction)lay_copy, METH_VARARGS},
|
||||
|
@ -2339,9 +2275,7 @@ static struct PyMethodDef lay_methods[] = {
|
|||
{"scale", (PyCFunction)lay_scale, METH_VARARGS},
|
||||
{"translate", (PyCFunction)lay_translate, METH_VARARGS},
|
||||
{"set_offsets", (PyCFunction)lay_set_offsets, METH_VARARGS},
|
||||
#if GIMP_CHECK_VERSION(1,1,0)
|
||||
{"get_tattoo", (PyCFunction)lay_get_tattoo, METH_VARARGS},
|
||||
#endif
|
||||
|
||||
drw_methods(),
|
||||
{NULL, NULL} /* sentinel */
|
||||
|
@ -2623,7 +2557,6 @@ chn_copy(self, args)
|
|||
return (PyObject *)newchnobject(id);
|
||||
}
|
||||
|
||||
#if GIMP_CHECK_VERSION(1,1,0)
|
||||
static PyObject *
|
||||
chn_get_tattoo(self, args)
|
||||
chnobject *self;
|
||||
|
@ -2633,13 +2566,10 @@ chn_get_tattoo(self, args)
|
|||
return NULL;
|
||||
return PyInt_FromLong(gimp_channel_get_tattoo(self->ID));
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct PyMethodDef chn_methods[] = {
|
||||
{"copy", (PyCFunction)chn_copy, METH_VARARGS},
|
||||
#if GIMP_CHECK_VERSION(1,1,0)
|
||||
{"get_tattoo", (PyCFunction)chn_get_tattoo, METH_VARARGS},
|
||||
#endif
|
||||
drw_methods(),
|
||||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
|
@ -3484,7 +3414,6 @@ static PyTypeObject Prtype = {
|
|||
/* End of code for PixelRegion objects */
|
||||
/* -------------------------------------------------------- */
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
static PyObject *
|
||||
para_copy(self, args)
|
||||
paraobject *self;
|
||||
|
@ -3559,20 +3488,13 @@ para_getattr(self, name)
|
|||
char *name;
|
||||
{
|
||||
if (!strcmp(name, "__members__")) {
|
||||
#if GIMP_CHECK_VERSION(1,1,5)
|
||||
return Py_BuildValue("[sssss]", "data", "flags", "is_persistent",
|
||||
"is_undoable", "name");
|
||||
#else
|
||||
return Py_BuildValue("[ssss]", "data", "flags", "is_persistent",
|
||||
"name");
|
||||
#endif
|
||||
}
|
||||
if (!strcmp(name, "is_persistent"))
|
||||
return PyInt_FromLong(gimp_parasite_is_persistent(self->para));
|
||||
#if GIMP_CHECK_VERSION(1,1,5)
|
||||
if (!strcmp(name, "is_undoable"))
|
||||
return PyInt_FromLong(gimp_parasite_is_undoable(self->para));
|
||||
#endif
|
||||
if (!strcmp(name, "flags"))
|
||||
return PyInt_FromLong(gimp_parasite_flags(self->para));
|
||||
if (!strcmp(name, "name"))
|
||||
|
@ -3629,7 +3551,6 @@ static PyTypeObject Paratype = {
|
|||
|
||||
/* End of code for GimpParasite objects */
|
||||
/* -------------------------------------------------------- */
|
||||
#endif
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO = {
|
||||
NULL, /* init_proc */
|
||||
|
@ -4429,7 +4350,6 @@ gimp_Extension_process(self, args)
|
|||
return Py_None;
|
||||
}
|
||||
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
static PyObject *
|
||||
new_parasite(self, args)
|
||||
PyObject *self, *args;
|
||||
|
@ -4489,9 +4409,7 @@ gimp_Parasite_detach(self, args)
|
|||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GIMP_HAVE_DEFAULT_DISPLAY
|
||||
static PyObject *
|
||||
gimp_Default_display(self, args)
|
||||
PyObject *self, *args;
|
||||
|
@ -4500,7 +4418,6 @@ gimp_Default_display(self, args)
|
|||
return NULL;
|
||||
return (PyObject *)newdispobject(gimp_default_display());
|
||||
}
|
||||
#endif
|
||||
|
||||
static PyObject *
|
||||
id2image(self, args)
|
||||
|
@ -4584,16 +4501,12 @@ static struct PyMethodDef gimp_methods[] = {
|
|||
{"tile_height", (PyCFunction)gimp_Tile_height, METH_VARARGS},
|
||||
{"extension_ack", (PyCFunction)gimp_Extension_ack, METH_VARARGS},
|
||||
{"extension_process", (PyCFunction)gimp_Extension_process, METH_VARARGS},
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
{"parasite", (PyCFunction)new_parasite, METH_VARARGS},
|
||||
{"parasite_find", (PyCFunction)gimp_Parasite_find, METH_VARARGS},
|
||||
{"parasite_attach", (PyCFunction)gimp_Parasite_attach, METH_VARARGS},
|
||||
{"attach_new_parasite",(PyCFunction)gimp_Attach_new_parasite,METH_VARARGS},
|
||||
{"parasite_detach", (PyCFunction)gimp_Parasite_detach, METH_VARARGS},
|
||||
#endif
|
||||
#ifdef GIMP_HAVE_DEFAULT_DISPLAY
|
||||
{"default_display", (PyCFunction)gimp_Default_display, METH_VARARGS},
|
||||
#endif
|
||||
{"_id2image", (PyCFunction)id2image, METH_VARARGS},
|
||||
{"_id2drawable", (PyCFunction)id2drawable, METH_VARARGS},
|
||||
{"_id2display", (PyCFunction)id2display, METH_VARARGS},
|
||||
|
@ -4645,9 +4558,7 @@ initgimp()
|
|||
PyDict_SetItemString(d, "DisplayType", (PyObject *)&Disptype);
|
||||
PyDict_SetItemString(d, "TileType", (PyObject *)&Tiletype);
|
||||
PyDict_SetItemString(d, "PixelRegionType", (PyObject *)&Prtype);
|
||||
#ifdef GIMP_HAVE_PARASITES
|
||||
PyDict_SetItemString(d, "ParasiteType", (PyObject *)&Paratype);
|
||||
#endif
|
||||
|
||||
PyDict_SetItemString(d, "major_version",
|
||||
i=PyInt_FromLong(gimp_major_version));
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
#include <X11/Xmu/WinUtil.h> /* for XmuClientWindow () */
|
||||
|
||||
#include "libgimp/gimpfeatures.h" /* for GIMP_VERSION */
|
||||
#include "libgimpbase/gimpversion.h"
|
||||
|
||||
|
||||
static gboolean start_new = FALSE;
|
||||
|
|
|
@ -35,7 +35,7 @@ HELP
|
|||
alias => 'g_strdup (GIMP_VERSION)', no_declare => 1 }
|
||||
);
|
||||
|
||||
%invoke = ( headers => [ qw("libgimp/gimpfeatures.h") ] );
|
||||
%invoke = ( headers => [ qw("libgimpbase/gimpbase.h") ] );
|
||||
}
|
||||
|
||||
sub quit {
|
||||
|
|
Loading…
Reference in New Issue