libgimp/gimp.def libgimp/gimpui.def libgimp/makefile.{cygwin,msc}

2000-02-15  Tor Lillqvist  <tml@iki.fi>

* libgimp/gimp.def
* libgimp/gimpui.def
* libgimp/makefile.{cygwin,msc}
* app/makefile.{cygwin,msc}
* plug-ins/makefile.{cygwin,msc}: Updates.

* app/datafiles.c (is_script): New Win32-only function, which
tests if a file's extension matches one of the extensions in the
PATHEXT environment variable (which the cmd.exe command
interpreter also uses). This is to avoid starting applications
associated with any random data file the user might have dropped
in the plug-ins folder, while still supporting plug-ins written in
scripting languages.

* app/gimpparasite.c (gimp_parasiterc_save): (Win32:) Cannot
rename to an existing file.

* plug-ins/Lighting/lighting_image.c
* plug-ins/Lighting/lighting_share.c
* plug-ins/MapObject/mapobject_preview.c
* plug-ins/MapObject/mapobject_shade.c: Use G_PI.

* plug-ins/common/gz.c: #ifdef G_OS_WIN32 was used before its
potential definition via glib.h.

* plug-ins/common/jpeg.c: Also recognize Exif files, which are
typically produced by digital cameras. The usually have a .jpg
file name extension, and would thus already match this plug-in,
but add the magic string just in case. They are loaded just fine
by libjpeg even if they don't have the JFIF signature.

* plug-ins/common/tiff.c: Set TIFF warning and error handler, so
we get to pass libtiff's messages through the normal channels.
This commit is contained in:
Tor Lillqvist 2000-02-14 22:44:06 +00:00 committed by Tor Lillqvist
parent 5dfe4f08f5
commit 970ad834d1
29 changed files with 340 additions and 63 deletions

View File

@ -1,3 +1,39 @@
2000-02-15 Tor Lillqvist <tml@iki.fi>
* libgimp/gimp.def
* libgimp/gimpui.def
* libgimp/makefile.{cygwin,msc}
* app/makefile.{cygwin,msc}
* plug-ins/makefile.{cygwin,msc}: Updates.
* app/datafiles.c (is_script): New Win32-only function, which
tests if a file's extension matches one of the extensions in the
PATHEXT environment variable (which the cmd.exe command
interpreter also uses). This is to avoid starting applications
associated with any random data file the user might have dropped
in the plug-ins folder, while still supporting plug-ins written in
scripting languages.
* app/gimpparasite.c (gimp_parasiterc_save): (Win32:) Cannot
rename to an existing file.
* plug-ins/Lighting/lighting_image.c
* plug-ins/Lighting/lighting_share.c
* plug-ins/MapObject/mapobject_preview.c
* plug-ins/MapObject/mapobject_shade.c: Use G_PI.
* plug-ins/common/gz.c: #ifdef G_OS_WIN32 was used before its
potential definition via glib.h.
* plug-ins/common/jpeg.c: Also recognize Exif files, which are
typically produced by digital cameras. The usually have a .jpg
file name extension, and would thus already match this plug-in,
but add the magic string just in case. They are loaded just fine
by libjpeg even if they don't have the JFIF signature.
* plug-ins/common/tiff.c: Set TIFF warning and error handler, so
we get to pass libtiff's messages through the normal channels.
2000-02-14 Michael Natterer <mitch@gimp.org>
* plug-ins/libgck/gck/Makefile.am

View File

@ -140,9 +140,23 @@ gimp_parasiterc_save (void)
fclose (fp);
#if defined(G_OS_WIN32) || defined(__EMX__)
/* First rename the old parasiterc out of the way */
unlink (gimp_personal_rc_file ("parasiterc.bak"));
rename (gimp_personal_rc_file ("parasiterc"),
gimp_personal_rc_file ("parasiterc.bak"));
#endif
if (rename(gimp_personal_rc_file ("#parasiterc.tmp~"),
gimp_personal_rc_file ("parasiterc")) != 0)
unlink(gimp_personal_rc_file ("#parasiterc.tmp~"));
{
#if defined(G_OS_WIN32) || defined(__EMX__)
/* Rename the old parasiterc back */
rename (gimp_personal_rc_file ("parasiterc.bak"),
gimp_personal_rc_file ("parasiterc"));
#endif
unlink(gimp_personal_rc_file ("#parasiterc.tmp~"));
}
}
void

View File

@ -39,9 +39,9 @@
#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
#endif
/* (Re)define S_IXUSR as _S_IREAD to get scripts, too. */
#undef S_IXUSR
#define S_IXUSR _S_IREAD
#ifndef S_IXUSR
#define S_IXUSR _S_IEXEC
#endif
#endif /* G_OS_WIN32 */
#include "datafiles.h"
@ -57,6 +57,51 @@
static int filestat_valid = 0;
static struct stat filestat;
#ifdef G_OS_WIN32
/*
* On Windows there is no concept like the Unix executable flag. There
* There is a weak emulation provided by the MS C Runtime using file
* extensions (com, exe, cmd, bat). This needs to be extended to treat
* scripts (Python, Perl, ...) as executables, too. We use the PATHEXT
* variable, which is also used by cmd.exe.
*/
gboolean
is_script (const gchar* filename)
{
const gchar *ext = strrchr (filename, '.');
gchar *pathext;
static gchar **exts = NULL;
gint i;
if (exts == NULL)
{
pathext = g_getenv ("PATHEXT");
if (pathext != NULL)
{
exts = g_strsplit (pathext, G_SEARCHPATH_SEPARATOR_S, 100);
g_free (pathext);
}
else
{
exts = g_new (gchar *, 1);
exts[0] = NULL;
}
}
i = 0;
while (exts[i] != NULL)
{
if (g_strcasecmp (ext, exts[i]) == 0)
return TRUE;
i++;
}
return FALSE;
}
#else /* !G_OS_WIN32 */
#define is_script(filename) FALSE
#endif
void
datafiles_read_directories (char *path_str,
datafile_loader_t loader_func,
@ -131,7 +176,9 @@ datafiles_read_directories (char *path_str,
err = stat(filename, &filestat);
if (!err && S_ISREG(filestat.st_mode) &&
(!(flags & MODE_EXECUTABLE) || (filestat.st_mode & S_IXUSR)))
(!(flags & MODE_EXECUTABLE) ||
(filestat.st_mode & S_IXUSR) ||
is_script (filename)))
{
filestat_valid = 1;
(*loader_func) (filename);

View File

@ -140,9 +140,23 @@ gimp_parasiterc_save (void)
fclose (fp);
#if defined(G_OS_WIN32) || defined(__EMX__)
/* First rename the old parasiterc out of the way */
unlink (gimp_personal_rc_file ("parasiterc.bak"));
rename (gimp_personal_rc_file ("parasiterc"),
gimp_personal_rc_file ("parasiterc.bak"));
#endif
if (rename(gimp_personal_rc_file ("#parasiterc.tmp~"),
gimp_personal_rc_file ("parasiterc")) != 0)
unlink(gimp_personal_rc_file ("#parasiterc.tmp~"));
{
#if defined(G_OS_WIN32) || defined(__EMX__)
/* Rename the old parasiterc back */
rename (gimp_personal_rc_file ("parasiterc.bak"),
gimp_personal_rc_file ("parasiterc"));
#endif
unlink(gimp_personal_rc_file ("#parasiterc.tmp~"));
}
}
void

View File

@ -39,9 +39,9 @@
#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
#endif
/* (Re)define S_IXUSR as _S_IREAD to get scripts, too. */
#undef S_IXUSR
#define S_IXUSR _S_IREAD
#ifndef S_IXUSR
#define S_IXUSR _S_IEXEC
#endif
#endif /* G_OS_WIN32 */
#include "datafiles.h"
@ -57,6 +57,51 @@
static int filestat_valid = 0;
static struct stat filestat;
#ifdef G_OS_WIN32
/*
* On Windows there is no concept like the Unix executable flag. There
* There is a weak emulation provided by the MS C Runtime using file
* extensions (com, exe, cmd, bat). This needs to be extended to treat
* scripts (Python, Perl, ...) as executables, too. We use the PATHEXT
* variable, which is also used by cmd.exe.
*/
gboolean
is_script (const gchar* filename)
{
const gchar *ext = strrchr (filename, '.');
gchar *pathext;
static gchar **exts = NULL;
gint i;
if (exts == NULL)
{
pathext = g_getenv ("PATHEXT");
if (pathext != NULL)
{
exts = g_strsplit (pathext, G_SEARCHPATH_SEPARATOR_S, 100);
g_free (pathext);
}
else
{
exts = g_new (gchar *, 1);
exts[0] = NULL;
}
}
i = 0;
while (exts[i] != NULL)
{
if (g_strcasecmp (ext, exts[i]) == 0)
return TRUE;
i++;
}
return FALSE;
}
#else /* !G_OS_WIN32 */
#define is_script(filename) FALSE
#endif
void
datafiles_read_directories (char *path_str,
datafile_loader_t loader_func,
@ -131,7 +176,9 @@ datafiles_read_directories (char *path_str,
err = stat(filename, &filestat);
if (!err && S_ISREG(filestat.st_mode) &&
(!(flags & MODE_EXECUTABLE) || (filestat.st_mode & S_IXUSR)))
(!(flags & MODE_EXECUTABLE) ||
(filestat.st_mode & S_IXUSR) ||
is_script (filename)))
{
filestat_valid = 1;
(*loader_func) (filename);

View File

@ -140,9 +140,23 @@ gimp_parasiterc_save (void)
fclose (fp);
#if defined(G_OS_WIN32) || defined(__EMX__)
/* First rename the old parasiterc out of the way */
unlink (gimp_personal_rc_file ("parasiterc.bak"));
rename (gimp_personal_rc_file ("parasiterc"),
gimp_personal_rc_file ("parasiterc.bak"));
#endif
if (rename(gimp_personal_rc_file ("#parasiterc.tmp~"),
gimp_personal_rc_file ("parasiterc")) != 0)
unlink(gimp_personal_rc_file ("#parasiterc.tmp~"));
{
#if defined(G_OS_WIN32) || defined(__EMX__)
/* Rename the old parasiterc back */
rename (gimp_personal_rc_file ("parasiterc.bak"),
gimp_personal_rc_file ("parasiterc"));
#endif
unlink(gimp_personal_rc_file ("#parasiterc.tmp~"));
}
}
void

View File

@ -71,7 +71,6 @@ gimp_OBJECTS = \
brush_select_cmds.o \
brushes_cmds.o \
bucket_fill.o \
buildmenu.o \
by_color_select.o \
channel.o \
channel_cmds.o \
@ -251,7 +250,6 @@ gimp_OBJECTS = \
undo_cmds.o \
undo_history.o \
unit_cmds.o \
vector2d.o \
xcf.o \
xinput_airbrush.o

View File

@ -78,7 +78,6 @@ gimp_OBJECTS = \
brush_select_cmds.obj \
brushes_cmds.obj \
bucket_fill.obj \
buildmenu.obj \
by_color_select.obj \
channel.obj \
channel_cmds.obj \
@ -258,7 +257,6 @@ gimp_OBJECTS = \
undo_cmds.obj \
undo_history.obj \
unit_cmds.obj \
vector2d.obj \
xcf.obj \
xinput_airbrush.obj

View File

@ -77,7 +77,6 @@ EXPORTS
gimp_gtkrc
gimp_help
gimp_hls_to_rgb
gimp_hls_value
gimp_hsv_to_rgb
gimp_hsv_to_rgb4
gimp_hsv_to_rgb_double
@ -180,20 +179,21 @@ EXPORTS
gimp_layer_width
gimp_main
gimp_major_version
gimp_matrix_determinant
gimp_matrix_duplicate
gimp_matrix_identity
gimp_matrix_invert
gimp_matrix_is_diagonal
gimp_matrix_is_identity
gimp_matrix_is_simple
gimp_matrix_mult
gimp_matrix_rotate
gimp_matrix_scale
gimp_matrix_transform_point
gimp_matrix_translate
gimp_matrix_xshear
gimp_matrix_yshear
gimp_matrix3_determinant
gimp_matrix3_duplicate
gimp_matrix3_identity
gimp_matrix3_invert
gimp_matrix3_is_diagonal
gimp_matrix3_is_identity
gimp_matrix3_is_simple
gimp_matrix3_mult
gimp_matrix3_rotate
gimp_matrix3_scale
gimp_matrix3_transform_point
gimp_matrix3_translate
gimp_matrix3_xshear
gimp_matrix3_yshear
gimp_matrix4_to_deg
gimp_message
gimp_micro_version
gimp_minor_version
@ -267,6 +267,28 @@ EXPORTS
gimp_unit_new
gimp_unit_set_deletion_flag
gimp_use_xshm
gimp_vector2_add
gimp_vector2_cross_product
gimp_vector2_inner_product
gimp_vector2_length
gimp_vector2_mul
gimp_vector2_neg
gimp_vector2_normalize
gimp_vector2_rotate
gimp_vector2_set
gimp_vector2_sub
gimp_vector3_add
gimp_vector3_cross_product
gimp_vector3_inner_product
gimp_vector3_length
gimp_vector3_mul
gimp_vector3_neg
gimp_vector3_normalize
gimp_vector3_rotate
gimp_vector3_set
gimp_vector3_sub
gimp_vector_2d_to_3d
gimp_vector_3d_to_2d
gp_config_write
gp_extension_ack_write
gp_init

View File

@ -45,12 +45,18 @@ EXPORTS
gimp_menu_item_update
gimp_option_menu_new
gimp_option_menu_new2
gimp_option_menu_set_history
gimp_pattern_close_popup
gimp_pattern_get_pattern_data
gimp_pattern_select_widget
gimp_pattern_select_widget_close_popup
gimp_pattern_select_widget_set_popup
gimp_pattern_set_popup
gimp_query_boolean_box
gimp_query_double_box
gimp_query_int_box
gimp_query_size_box
gimp_query_string_box
gimp_radio_button_update
gimp_radio_group_new
gimp_radio_group_new2

View File

@ -59,8 +59,10 @@ gimpi_OBJECTS = \
gimpmatrix.o \
gimppatheditor.o\
gimpprotocol.o \
gimpquerybox.o \
gimpsizeentry.o \
gimpunitmenu.o \
gimpvector.o \
gimpwidgets.o \
gimpwire.o \
gserialize.o \
@ -89,6 +91,7 @@ gimp_OBJECTS = \
gimpselection.o \
gimptile.o \
gimpunit.o \
gimpvector.o \
gimpwire.o \
gserialize.o \
parasite.o \
@ -129,6 +132,8 @@ gimptile.o : gimptile.c
$(CC) $(CFLAGS) -c -DLIBGIMP_COMPILATION gimptile.c
gimpunit.o : gimpunit.c
$(CC) $(CFLAGS) -c -DLIBGIMP_COMPILATION gimpunit.c
gimpvector.o : gimpvector.c
$(CC) $(CFLAGS) -c -DLIBGIMP_COMPILATION gimpvector.c
gimpwire.o : gimpwire.c
$(CC) $(CFLAGS) -c -DLIBGIMP_COMPILATION gimpwire.c
gserialize.o : gserialize.c
@ -147,6 +152,7 @@ gimpui_OBJECTS = \
gimphelpui.o \
gimpgradientmenu.o \
gimppatternmenu.o \
gimpquerybox.o \
gimpsizeentry.o \
gimpunitmenu.o \
gimpwidgets.o

View File

@ -65,8 +65,10 @@ gimpi_OBJECTS = \
gimpmatrix.obj \
gimppatheditor.obj\
gimpprotocol.obj\
gimpquerybox.obj\
gimpsizeentry.obj\
gimpunitmenu.obj\
gimpvector.obj \
gimpwidgets.obj \
gimpwire.obj \
gserialize.obj \
@ -95,6 +97,7 @@ gimp_OBJECTS = \
gimpselection.obj\
gimptile.obj \
gimpunit.obj \
gimpvector.obj \
gimpwire.obj \
gserialize.obj \
parasite.obj \
@ -135,6 +138,8 @@ gimptile.obj : gimptile.c
$(CC) $(CFLAGS) -GD -c -DLIBGIMP_COMPILATION gimptile.c
gimpunit.obj : gimpunit.c
$(CC) $(CFLAGS) -GD -c -DLIBGIMP_COMPILATION gimpunit.c
gimpvector.obj : gimpvector.c
$(CC) $(CFLAGS) -GD -c -DLIBGIMP_COMPILATION gimpvector.c
gimpwire.obj : gimpwire.c
$(CC) $(CFLAGS) -GD -c -DLIBGIMP_COMPILATION gimpwire.c
gserialize.obj : gserialize.c
@ -153,6 +158,7 @@ gimpui_OBJECTS = \
gimpgradientmenu.obj\
gimphelpui.obj \
gimppatternmenu.obj\
gimpquerybox.obj\
gimpsizeentry.obj\
gimpunitmenu.obj\
gimpwidgets.obj

View File

@ -39,9 +39,9 @@
#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
#endif
/* (Re)define S_IXUSR as _S_IREAD to get scripts, too. */
#undef S_IXUSR
#define S_IXUSR _S_IREAD
#ifndef S_IXUSR
#define S_IXUSR _S_IEXEC
#endif
#endif /* G_OS_WIN32 */
#include "datafiles.h"
@ -57,6 +57,51 @@
static int filestat_valid = 0;
static struct stat filestat;
#ifdef G_OS_WIN32
/*
* On Windows there is no concept like the Unix executable flag. There
* There is a weak emulation provided by the MS C Runtime using file
* extensions (com, exe, cmd, bat). This needs to be extended to treat
* scripts (Python, Perl, ...) as executables, too. We use the PATHEXT
* variable, which is also used by cmd.exe.
*/
gboolean
is_script (const gchar* filename)
{
const gchar *ext = strrchr (filename, '.');
gchar *pathext;
static gchar **exts = NULL;
gint i;
if (exts == NULL)
{
pathext = g_getenv ("PATHEXT");
if (pathext != NULL)
{
exts = g_strsplit (pathext, G_SEARCHPATH_SEPARATOR_S, 100);
g_free (pathext);
}
else
{
exts = g_new (gchar *, 1);
exts[0] = NULL;
}
}
i = 0;
while (exts[i] != NULL)
{
if (g_strcasecmp (ext, exts[i]) == 0)
return TRUE;
i++;
}
return FALSE;
}
#else /* !G_OS_WIN32 */
#define is_script(filename) FALSE
#endif
void
datafiles_read_directories (char *path_str,
datafile_loader_t loader_func,
@ -131,7 +176,9 @@ datafiles_read_directories (char *path_str,
err = stat(filename, &filestat);
if (!err && S_ISREG(filestat.st_mode) &&
(!(flags & MODE_EXECUTABLE) || (filestat.st_mode & S_IXUSR)))
(!(flags & MODE_EXECUTABLE) ||
(filestat.st_mode & S_IXUSR) ||
is_script (filename)))
{
filestat_valid = 1;
(*loader_func) (filename);

View File

@ -270,8 +270,8 @@ void compute_maps(void)
for (x=0;x<256;x++)
{
sinemap[x]=(guchar)(255.0*(0.5*(sin((M_PI*c*(gdouble)x)-0.5*M_PI)+1.0)));
spheremap[x]=(guchar)(255.0*(sqrt(sin(M_PI*(gdouble)x/512.0))));
sinemap[x]=(guchar)(255.0*(0.5*(sin((G_PI*c*(gdouble)x)-0.5*G_PI)+1.0)));
spheremap[x]=(guchar)(255.0*(sqrt(sin(G_PI*(gdouble)x/512.0))));
val=(d*exp(-1.0/(8.0*c*((gdouble)x+5.0))));
if (val>255.0)

View File

@ -374,7 +374,7 @@ void sphere_to_image(GimpVector3 *normal,gdouble *u,gdouble *v)
alpha=acos(-gimp_vector3_inner_product(&secondaxis,normal));
*v=alpha/M_PI;
*v=alpha/G_PI;
if (*v==0.0 || *v==1.0) *u=0.0;
else
@ -389,7 +389,7 @@ void sphere_to_image(GimpVector3 *normal,gdouble *u,gdouble *v)
else if (fac<-1.0)
fac=-1.0;
*u=acos(fac)/(2.0*M_PI);
*u=acos(fac)/(2.0*G_PI);
cross_prod=gimp_vector3_cross_product(&secondaxis,&firstaxis);

View File

@ -504,7 +504,7 @@ void draw_wireframe_sphere(gint startx,gint starty,gint pw,gint ph)
/* Compute wireframe points */
/* ======================== */
twopifac=(2.0*M_PI)/WIRESIZE;
twopifac=(2.0*G_PI)/WIRESIZE;
for (cnt=0;cnt<WIRESIZE;cnt++)
{

View File

@ -193,7 +193,7 @@ void sphere_to_image(GimpVector3 *normal,gdouble *u,gdouble *v)
alpha=acos(-gimp_vector3_inner_product(&mapvals.secondaxis,normal));
*v=alpha/M_PI;
*v=alpha/G_PI;
if (*v==0.0 || *v==1.0) *u=0.0;
else
@ -208,7 +208,7 @@ void sphere_to_image(GimpVector3 *normal,gdouble *u,gdouble *v)
else if (fac<-1.0)
fac=-1.0;
*u=acos(fac)/(2.0*M_PI);
*u=acos(fac)/(2.0*G_PI);
cross_prod=gimp_vector3_cross_product(&mapvals.secondaxis,&mapvals.firstaxis);
@ -445,8 +445,8 @@ void rotatemat(gfloat angle,GimpVector3 *v,gfloat m[16])
gfloat IdentityMat[16];
gint cnt;
s = sin( angle * (M_PI / 180.0) );
c = cos( angle * (M_PI / 180.0) );
s = sin( angle * (G_PI / 180.0) );
c = cos( angle * (G_PI / 180.0) );
mag = sqrt( v->x*v->x + v->y*v->y + v->z*v->z );
@ -951,7 +951,7 @@ gdouble compute_angle(gdouble x,gdouble y)
if (x<0)
a = 0;
else
a = M_PI;
a = G_PI;
}
else
{
@ -960,17 +960,17 @@ gdouble compute_angle(gdouble x,gdouble y)
else
{
if (y>0.0)
a = M_PI/2.0;
a = G_PI/2.0;
else
a = 1.5 * M_PI;
a = 1.5 * G_PI;
}
if (y<0.0 && x>0.0) /* 4th quad, a is negative */
a = 2.0*M_PI + a;
a = 2.0*G_PI + a;
else if (y<0.0 && x<0.0) /* 3rd quad, a is positive */
a = M_PI + a;
a = G_PI + a;
else if (y>0.0 && x<0.0) /* 2nd quad, a is negative */
a = M_PI + a;
a = G_PI + a;
}
return(a);
@ -1020,7 +1020,7 @@ gboolean intersect_cylinder(GimpVector3 vp,GimpVector3 dir,FaceIntersectInfo *fa
l = mapvals.cylinder_length/2.0;
face_intersect[i].u = compute_angle(face_intersect[i].s.x,face_intersect[i].s.z)/(2.0*M_PI);
face_intersect[i].u = compute_angle(face_intersect[i].s.x,face_intersect[i].s.z)/(2.0*G_PI);
face_intersect[i].v = (face_intersect[i].s.y+l)/mapvals.cylinder_length;
/* Mark hitpoint as on the cylinder hull */

View File

@ -58,8 +58,9 @@
#include "config.h"
#ifdef G_OS_WIN32
#include <glib.h> /* For G_OS_WIN32 */
#ifdef G_OS_WIN32
#define STRICT
#define WinMain WinMain_foo
#include <windows.h>

View File

@ -58,8 +58,9 @@
#include "config.h"
#ifdef G_OS_WIN32
#include <glib.h> /* For G_OS_WIN32 */
#ifdef G_OS_WIN32
#define STRICT
#define WinMain WinMain_foo
#include <windows.h>

View File

@ -347,7 +347,7 @@ query (void)
gimp_register_magic_load_handler ("file_jpeg_load",
"jpg,jpeg",
"",
"6,string,JFIF");
"6,string,JFIF,6,string,Exif");
gimp_register_save_handler ("file_jpeg_save",
"jpg,jpeg",
"");

View File

@ -391,6 +391,19 @@ run (gchar *name,
values[0].data.d_status = status;
}
static void
tiff_warning(const char* module, const char* fmt, va_list ap)
{
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, fmt, ap);
}
static void
tiff_error(const char* module, const char* fmt, va_list ap)
{
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, fmt, ap);
gimp_quit ();
}
static gint32
load_image (gchar *filename)
{
@ -414,6 +427,10 @@ load_image (gchar *filename)
Parasite *parasite;
#endif /* GIMP_HAVE_PARASITES */
guint16 tmp;
TIFFSetWarningHandler (tiff_warning);
TIFFSetErrorHandler (tiff_error);
tif = TIFFOpen (filename, "r");
if (!tif) {
g_message ("TIFF Can't open %s\n", filename);
@ -1194,6 +1211,9 @@ static gint save_image (char *filename,
predictor = 0;
rowsperstrip = 0;
TIFFSetWarningHandler (tiff_warning);
TIFFSetErrorHandler (tiff_error);
tif = TIFFOpen (filename, "w");
if (!tif)
{

View File

@ -347,7 +347,7 @@ query (void)
gimp_register_magic_load_handler ("file_jpeg_load",
"jpg,jpeg",
"",
"6,string,JFIF");
"6,string,JFIF,6,string,Exif");
gimp_register_save_handler ("file_jpeg_save",
"jpg,jpeg",
"");

View File

@ -347,7 +347,7 @@ query (void)
gimp_register_magic_load_handler ("file_jpeg_load",
"jpg,jpeg",
"",
"6,string,JFIF");
"6,string,JFIF,6,string,Exif");
gimp_register_save_handler ("file_jpeg_save",
"jpg,jpeg",
"");

View File

@ -347,7 +347,7 @@ query (void)
gimp_register_magic_load_handler ("file_jpeg_load",
"jpg,jpeg",
"",
"6,string,JFIF");
"6,string,JFIF,6,string,Exif");
gimp_register_save_handler ("file_jpeg_save",
"jpg,jpeg",
"");

View File

@ -347,7 +347,7 @@ query (void)
gimp_register_magic_load_handler ("file_jpeg_load",
"jpg,jpeg",
"",
"6,string,JFIF");
"6,string,JFIF,6,string,Exif");
gimp_register_save_handler ("file_jpeg_save",
"jpg,jpeg",
"");

View File

@ -347,7 +347,7 @@ query (void)
gimp_register_magic_load_handler ("file_jpeg_load",
"jpg,jpeg",
"",
"6,string,JFIF");
"6,string,JFIF,6,string,Exif");
gimp_register_save_handler ("file_jpeg_save",
"jpg,jpeg",
"");

View File

@ -347,7 +347,7 @@ query (void)
gimp_register_magic_load_handler ("file_jpeg_load",
"jpg,jpeg",
"",
"6,string,JFIF");
"6,string,JFIF,6,string,Exif");
gimp_register_save_handler ("file_jpeg_save",
"jpg,jpeg",
"");

View File

@ -37,7 +37,7 @@ SEPARATE = AlienMap AlienMap2 FractalExplorer Lighting MapObject bmp borderavera
# ../unofficial-plug-ins directory, go there, and do "make -f
# makefile.cygwin unofficial".
UNOFFICIAL = Anamorphose RGB_Displace ccanalyze fuse gimp_ace guash sel_gauss user_filter
UNOFFICIAL = Anamorphose RGB_Displace ccanalyze gimp_ace guash sel_gauss user_filter
# The main target
@ -63,7 +63,7 @@ libs-clean :
$(MAKE) -f makefile.cygwin sub-libs TARGET=clean
sub-libs:
cd libgck/gck; $(MAKE) -f ../../makefile.cygwin TOP=../../.. LIBRARY=gck OBJECTS="gckcolor.o gcklistbox.o gckmath.o gckui.o gckvector.o" $(TARGET)
cd libgck/gck; $(MAKE) -f ../../makefile.cygwin TOP=../../.. LIBRARY=gck OBJECTS="gckcolor.o gckui.o" $(TARGET)

View File

@ -36,7 +36,7 @@ SEPARATE = AlienMap AlienMap2 FractalExplorer Lighting MapObject bmp borderavera
# ..\unofficial-plug-ins directory, go there, and do "nmake -f
# makefile.msc unofficial".
UNOFFICIAL = Anamorphose RGB_Displace ccanalyze fuse gimp_ace guash pmosaic sel_gauss user_filter
UNOFFICIAL = Anamorphose RGB_Displace ccanalyze gimp_ace guash pmosaic sel_gauss user_filter
# The main target
@ -63,7 +63,7 @@ libs-clean :
sub-libs:
cd libgck\gck
nmake -nologo -f ..\..\makefile.msc TOP=..\..\.. LIBRARY=gck OBJECTS="gckcolor.obj gcklistbox.obj gckmath.obj gckui.obj gckvector.obj" $(TARGET)
nmake -nologo -f ..\..\makefile.msc TOP=..\..\.. LIBRARY=gck OBJECTS="gckcolor.obj gckui.obj" $(TARGET)
cd ..\..