Commit 1c2a8015 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

merged fix for #71409 from stable branch.

2002-12-17  Sven Neumann  <sven@gimp.org>

	* app/main.c: merged fix for #71409 from stable branch.

	* plug-ins/common/jpeg.c: merged fix for #75398 from stable branch.
parent 6af7df62
2002-12-17 Sven Neumann <sven@gimp.org>
* app/main.c: merged fix for #71409 from stable branch.
* plug-ins/common/jpeg.c: merged fix for #75398 from stable branch.
2002-12-17 Michael Natterer <mitch@gimp.org>
* app/tools/gimptransformtool.c
......@@ -32,7 +38,7 @@
simulate the vision of people with color-deficiency to address
bug #101256. Didn't know any scientific name or any correct formula,
so I just added the framework plus the approximation formula from
the bug report. Will need some more work to become usable.
the bug report. Will need some more work to become useable.
2002-12-16 Sven Neumann <sven@gimp.org>
......
......@@ -439,14 +439,20 @@ main (int argc,
/* Handle fatal signals */
/* these are handled by gimp_terminate() */
gimp_signal_private (SIGHUP, gimp_sigfatal_handler, 0);
gimp_signal_private (SIGINT, gimp_sigfatal_handler, 0);
gimp_signal_private (SIGQUIT, gimp_sigfatal_handler, 0);
gimp_signal_private (SIGABRT, gimp_sigfatal_handler, 0);
gimp_signal_private (SIGBUS, gimp_sigfatal_handler, 0);
gimp_signal_private (SIGSEGV, gimp_sigfatal_handler, 0);
gimp_signal_private (SIGTERM, gimp_sigfatal_handler, 0);
gimp_signal_private (SIGFPE, gimp_sigfatal_handler, 0);
if (stack_trace_mode != STACK_TRACE_NEVER)
{
/* these are handled by gimp_fatal_error() */
gimp_signal_private (SIGBUS, gimp_sigfatal_handler, 0);
gimp_signal_private (SIGSEGV, gimp_sigfatal_handler, 0);
gimp_signal_private (SIGFPE, gimp_sigfatal_handler, 0);
}
/* Ignore SIGPIPE because plug_in.c handles broken pipes */
......
......@@ -712,9 +712,7 @@ load_image (gchar *filename,
gint scanlines;
gint i, start, end;
JpegSaveVals local_save_vals;
GimpParasite * volatile comment_parasite = NULL;
GimpParasite * volatile vals_parasite = NULL;
/* We set up the normal JPEG error routines. */
cinfo.err = jpeg_std_error (&jerr.pub);
......@@ -786,29 +784,9 @@ load_image (gchar *filename,
comment_parasite = NULL;
}
/* pw - figuring out what the saved values were is non-trivial.
* They don't seem to be in the cinfo structure. For now, I will
* just use the defaults, but if someone figures out how to derive
* them this is the place to store them. */
local_save_vals.quality = DEFAULT_QUALITY;
local_save_vals.smoothing = DEFAULT_SMOOTHING;
local_save_vals.optimize = DEFAULT_OPTIMIZE;
#ifdef HAVE_PROGRESSIVE_JPEG
local_save_vals.progressive = cinfo.progressive_mode;
#else
local_save_vals.progressive = 0;
#endif /* HAVE_PROGRESSIVE_JPEG */
local_save_vals.baseline = DEFAULT_BASELINE;
local_save_vals.subsmp = DEFAULT_SUBSMP; /* sg - this _is_ there, but I'm too lazy */
local_save_vals.restart = DEFAULT_RESTART;
local_save_vals.dct = DEFAULT_DCT;
local_save_vals.preview = DEFAULT_PREVIEW;
vals_parasite = gimp_parasite_new ("jpeg-save-options", 0,
sizeof (local_save_vals),
&local_save_vals);
/* Do not attach the "jpeg-save-options" parasite to the image
* because this conflics with the global defaults. See bug #75398:
* http://bugzilla.gnome.org/show_bug.cgi?id=75398 */
}
/* Step 4: set parameters for decompression */
......@@ -1061,19 +1039,13 @@ load_image (gchar *filename,
/* pw - Last of all, attach the parasites (couldn't do it earlier -
there was no image. */
if (!preview)
if (!preview)
{
if (comment_parasite)
{
gimp_image_parasite_attach (image_ID, comment_parasite);
gimp_parasite_free (comment_parasite);
}
if (vals_parasite)
{
gimp_image_parasite_attach (image_ID, vals_parasite);
gimp_parasite_free (vals_parasite);
}
}
return image_ID;
......
......@@ -712,9 +712,7 @@ load_image (gchar *filename,
gint scanlines;
gint i, start, end;
JpegSaveVals local_save_vals;
GimpParasite * volatile comment_parasite = NULL;
GimpParasite * volatile vals_parasite = NULL;
/* We set up the normal JPEG error routines. */
cinfo.err = jpeg_std_error (&jerr.pub);
......@@ -786,29 +784,9 @@ load_image (gchar *filename,
comment_parasite = NULL;
}
/* pw - figuring out what the saved values were is non-trivial.
* They don't seem to be in the cinfo structure. For now, I will
* just use the defaults, but if someone figures out how to derive
* them this is the place to store them. */
local_save_vals.quality = DEFAULT_QUALITY;
local_save_vals.smoothing = DEFAULT_SMOOTHING;
local_save_vals.optimize = DEFAULT_OPTIMIZE;
#ifdef HAVE_PROGRESSIVE_JPEG
local_save_vals.progressive = cinfo.progressive_mode;
#else
local_save_vals.progressive = 0;
#endif /* HAVE_PROGRESSIVE_JPEG */
local_save_vals.baseline = DEFAULT_BASELINE;
local_save_vals.subsmp = DEFAULT_SUBSMP; /* sg - this _is_ there, but I'm too lazy */
local_save_vals.restart = DEFAULT_RESTART;
local_save_vals.dct = DEFAULT_DCT;
local_save_vals.preview = DEFAULT_PREVIEW;
vals_parasite = gimp_parasite_new ("jpeg-save-options", 0,
sizeof (local_save_vals),
&local_save_vals);
/* Do not attach the "jpeg-save-options" parasite to the image
* because this conflics with the global defaults. See bug #75398:
* http://bugzilla.gnome.org/show_bug.cgi?id=75398 */
}
/* Step 4: set parameters for decompression */
......@@ -1061,19 +1039,13 @@ load_image (gchar *filename,
/* pw - Last of all, attach the parasites (couldn't do it earlier -
there was no image. */
if (!preview)
if (!preview)
{
if (comment_parasite)
{
gimp_image_parasite_attach (image_ID, comment_parasite);
gimp_parasite_free (comment_parasite);
}
if (vals_parasite)
{
gimp_image_parasite_attach (image_ID, vals_parasite);
gimp_parasite_free (vals_parasite);
}
}
return image_ID;
......
......@@ -712,9 +712,7 @@ load_image (gchar *filename,
gint scanlines;
gint i, start, end;
JpegSaveVals local_save_vals;
GimpParasite * volatile comment_parasite = NULL;
GimpParasite * volatile vals_parasite = NULL;
/* We set up the normal JPEG error routines. */
cinfo.err = jpeg_std_error (&jerr.pub);
......@@ -786,29 +784,9 @@ load_image (gchar *filename,
comment_parasite = NULL;
}
/* pw - figuring out what the saved values were is non-trivial.
* They don't seem to be in the cinfo structure. For now, I will
* just use the defaults, but if someone figures out how to derive
* them this is the place to store them. */
local_save_vals.quality = DEFAULT_QUALITY;
local_save_vals.smoothing = DEFAULT_SMOOTHING;
local_save_vals.optimize = DEFAULT_OPTIMIZE;
#ifdef HAVE_PROGRESSIVE_JPEG
local_save_vals.progressive = cinfo.progressive_mode;
#else
local_save_vals.progressive = 0;
#endif /* HAVE_PROGRESSIVE_JPEG */
local_save_vals.baseline = DEFAULT_BASELINE;
local_save_vals.subsmp = DEFAULT_SUBSMP; /* sg - this _is_ there, but I'm too lazy */
local_save_vals.restart = DEFAULT_RESTART;
local_save_vals.dct = DEFAULT_DCT;
local_save_vals.preview = DEFAULT_PREVIEW;
vals_parasite = gimp_parasite_new ("jpeg-save-options", 0,
sizeof (local_save_vals),
&local_save_vals);
/* Do not attach the "jpeg-save-options" parasite to the image
* because this conflics with the global defaults. See bug #75398:
* http://bugzilla.gnome.org/show_bug.cgi?id=75398 */
}
/* Step 4: set parameters for decompression */
......@@ -1061,19 +1039,13 @@ load_image (gchar *filename,
/* pw - Last of all, attach the parasites (couldn't do it earlier -
there was no image. */
if (!preview)
if (!preview)
{
if (comment_parasite)
{
gimp_image_parasite_attach (image_ID, comment_parasite);
gimp_parasite_free (comment_parasite);
}
if (vals_parasite)
{
gimp_image_parasite_attach (image_ID, vals_parasite);
gimp_parasite_free (vals_parasite);
}
}
return image_ID;
......
......@@ -712,9 +712,7 @@ load_image (gchar *filename,
gint scanlines;
gint i, start, end;
JpegSaveVals local_save_vals;
GimpParasite * volatile comment_parasite = NULL;
GimpParasite * volatile vals_parasite = NULL;
/* We set up the normal JPEG error routines. */
cinfo.err = jpeg_std_error (&jerr.pub);
......@@ -786,29 +784,9 @@ load_image (gchar *filename,
comment_parasite = NULL;
}
/* pw - figuring out what the saved values were is non-trivial.
* They don't seem to be in the cinfo structure. For now, I will
* just use the defaults, but if someone figures out how to derive
* them this is the place to store them. */
local_save_vals.quality = DEFAULT_QUALITY;
local_save_vals.smoothing = DEFAULT_SMOOTHING;
local_save_vals.optimize = DEFAULT_OPTIMIZE;
#ifdef HAVE_PROGRESSIVE_JPEG
local_save_vals.progressive = cinfo.progressive_mode;
#else
local_save_vals.progressive = 0;
#endif /* HAVE_PROGRESSIVE_JPEG */
local_save_vals.baseline = DEFAULT_BASELINE;
local_save_vals.subsmp = DEFAULT_SUBSMP; /* sg - this _is_ there, but I'm too lazy */
local_save_vals.restart = DEFAULT_RESTART;
local_save_vals.dct = DEFAULT_DCT;
local_save_vals.preview = DEFAULT_PREVIEW;
vals_parasite = gimp_parasite_new ("jpeg-save-options", 0,
sizeof (local_save_vals),
&local_save_vals);
/* Do not attach the "jpeg-save-options" parasite to the image
* because this conflics with the global defaults. See bug #75398:
* http://bugzilla.gnome.org/show_bug.cgi?id=75398 */
}
/* Step 4: set parameters for decompression */
......@@ -1061,19 +1039,13 @@ load_image (gchar *filename,
/* pw - Last of all, attach the parasites (couldn't do it earlier -
there was no image. */
if (!preview)
if (!preview)
{
if (comment_parasite)
{
gimp_image_parasite_attach (image_ID, comment_parasite);
gimp_parasite_free (comment_parasite);
}
if (vals_parasite)
{
gimp_image_parasite_attach (image_ID, vals_parasite);
gimp_parasite_free (vals_parasite);
}
}
return image_ID;
......
......@@ -712,9 +712,7 @@ load_image (gchar *filename,
gint scanlines;
gint i, start, end;
JpegSaveVals local_save_vals;
GimpParasite * volatile comment_parasite = NULL;
GimpParasite * volatile vals_parasite = NULL;
/* We set up the normal JPEG error routines. */
cinfo.err = jpeg_std_error (&jerr.pub);
......@@ -786,29 +784,9 @@ load_image (gchar *filename,
comment_parasite = NULL;
}
/* pw - figuring out what the saved values were is non-trivial.
* They don't seem to be in the cinfo structure. For now, I will
* just use the defaults, but if someone figures out how to derive
* them this is the place to store them. */
local_save_vals.quality = DEFAULT_QUALITY;
local_save_vals.smoothing = DEFAULT_SMOOTHING;
local_save_vals.optimize = DEFAULT_OPTIMIZE;
#ifdef HAVE_PROGRESSIVE_JPEG
local_save_vals.progressive = cinfo.progressive_mode;
#else
local_save_vals.progressive = 0;
#endif /* HAVE_PROGRESSIVE_JPEG */
local_save_vals.baseline = DEFAULT_BASELINE;
local_save_vals.subsmp = DEFAULT_SUBSMP; /* sg - this _is_ there, but I'm too lazy */
local_save_vals.restart = DEFAULT_RESTART;
local_save_vals.dct = DEFAULT_DCT;
local_save_vals.preview = DEFAULT_PREVIEW;
vals_parasite = gimp_parasite_new ("jpeg-save-options", 0,
sizeof (local_save_vals),
&local_save_vals);
/* Do not attach the "jpeg-save-options" parasite to the image
* because this conflics with the global defaults. See bug #75398:
* http://bugzilla.gnome.org/show_bug.cgi?id=75398 */
}
/* Step 4: set parameters for decompression */
......@@ -1061,19 +1039,13 @@ load_image (gchar *filename,
/* pw - Last of all, attach the parasites (couldn't do it earlier -
there was no image. */
if (!preview)
if (!preview)
{
if (comment_parasite)
{
gimp_image_parasite_attach (image_ID, comment_parasite);
gimp_parasite_free (comment_parasite);
}
if (vals_parasite)
{
gimp_image_parasite_attach (image_ID, vals_parasite);
gimp_parasite_free (vals_parasite);
}
}
return image_ID;
......
......@@ -712,9 +712,7 @@ load_image (gchar *filename,
gint scanlines;
gint i, start, end;
JpegSaveVals local_save_vals;
GimpParasite * volatile comment_parasite = NULL;
GimpParasite * volatile vals_parasite = NULL;
/* We set up the normal JPEG error routines. */
cinfo.err = jpeg_std_error (&jerr.pub);
......@@ -786,29 +784,9 @@ load_image (gchar *filename,
comment_parasite = NULL;
}
/* pw - figuring out what the saved values were is non-trivial.
* They don't seem to be in the cinfo structure. For now, I will
* just use the defaults, but if someone figures out how to derive
* them this is the place to store them. */
local_save_vals.quality = DEFAULT_QUALITY;
local_save_vals.smoothing = DEFAULT_SMOOTHING;
local_save_vals.optimize = DEFAULT_OPTIMIZE;
#ifdef HAVE_PROGRESSIVE_JPEG
local_save_vals.progressive = cinfo.progressive_mode;
#else
local_save_vals.progressive = 0;
#endif /* HAVE_PROGRESSIVE_JPEG */
local_save_vals.baseline = DEFAULT_BASELINE;
local_save_vals.subsmp = DEFAULT_SUBSMP; /* sg - this _is_ there, but I'm too lazy */
local_save_vals.restart = DEFAULT_RESTART;
local_save_vals.dct = DEFAULT_DCT;
local_save_vals.preview = DEFAULT_PREVIEW;
vals_parasite = gimp_parasite_new ("jpeg-save-options", 0,
sizeof (local_save_vals),
&local_save_vals);
/* Do not attach the "jpeg-save-options" parasite to the image
* because this conflics with the global defaults. See bug #75398:
* http://bugzilla.gnome.org/show_bug.cgi?id=75398 */
}
/* Step 4: set parameters for decompression */
......@@ -1061,19 +1039,13 @@ load_image (gchar *filename,
/* pw - Last of all, attach the parasites (couldn't do it earlier -
there was no image. */
if (!preview)
if (!preview)
{
if (comment_parasite)
{
gimp_image_parasite_attach (image_ID, comment_parasite);
gimp_parasite_free (comment_parasite);
}
if (vals_parasite)
{
gimp_image_parasite_attach (image_ID, vals_parasite);
gimp_parasite_free (vals_parasite);
}
}
return image_ID;
......
......@@ -712,9 +712,7 @@ load_image (gchar *filename,
gint scanlines;
gint i, start, end;
JpegSaveVals local_save_vals;
GimpParasite * volatile comment_parasite = NULL;
GimpParasite * volatile vals_parasite = NULL;
/* We set up the normal JPEG error routines. */
cinfo.err = jpeg_std_error (&jerr.pub);
......@@ -786,29 +784,9 @@ load_image (gchar *filename,
comment_parasite = NULL;
}
/* pw - figuring out what the saved values were is non-trivial.
* They don't seem to be in the cinfo structure. For now, I will
* just use the defaults, but if someone figures out how to derive
* them this is the place to store them. */
local_save_vals.quality = DEFAULT_QUALITY;
local_save_vals.smoothing = DEFAULT_SMOOTHING;
local_save_vals.optimize = DEFAULT_OPTIMIZE;
#ifdef HAVE_PROGRESSIVE_JPEG
local_save_vals.progressive = cinfo.progressive_mode;
#else
local_save_vals.progressive = 0;
#endif /* HAVE_PROGRESSIVE_JPEG */
local_save_vals.baseline = DEFAULT_BASELINE;
local_save_vals.subsmp = DEFAULT_SUBSMP; /* sg - this _is_ there, but I'm too lazy */
local_save_vals.restart = DEFAULT_RESTART;
local_save_vals.dct = DEFAULT_DCT;
local_save_vals.preview = DEFAULT_PREVIEW;
vals_parasite = gimp_parasite_new ("jpeg-save-options", 0,
sizeof (local_save_vals),
&local_save_vals);
/* Do not attach the "jpeg-save-options" parasite to the image
* because this conflics with the global defaults. See bug #75398:
* http://bugzilla.gnome.org/show_bug.cgi?id=75398 */
}
/* Step 4: set parameters for decompression */
......@@ -1061,19 +1039,13 @@ load_image (gchar *filename,
/* pw - Last of all, attach the parasites (couldn't do it earlier -
there was no image. */
if (!preview)
if (!preview)
{
if (comment_parasite)
{
gimp_image_parasite_attach (image_ID, comment_parasite);
gimp_parasite_free (comment_parasite);
}
if (vals_parasite)
{
gimp_image_parasite_attach (image_ID, vals_parasite);
gimp_parasite_free (vals_parasite);
}
}
return image_ID;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment