mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 12:32:37 +00:00
plug-ins/jpeg/jpeg-load.c ifdef'ed out some debugging statements so that
2007-09-19 Raphael Quinet <raphael@gimp.org> * plug-ins/jpeg/jpeg-load.c * plug-ins/jpeg/jpeg-save.c: ifdef'ed out some debugging statements so that they show up only in unstable releases. * plug-ins/jpeg/jpeg.c (run): removed calls to gimp_set_data() and gimp_get_data() so that changes made to the JPEG save settings for one file do not affect other files saved later. svn path=/trunk/; revision=23584
This commit is contained in:
parent
dcb16bbaad
commit
51a3ee471b
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2007-09-19 Raphaël Quinet <raphael@gimp.org>
|
||||
|
||||
* plug-ins/jpeg/jpeg-load.c
|
||||
* plug-ins/jpeg/jpeg-save.c: ifdef'ed out some debugging
|
||||
statements so that they show up only in unstable releases.
|
||||
|
||||
* plug-ins/jpeg/jpeg.c (run): removed calls to gimp_set_data() and
|
||||
gimp_get_data() so that changes made to the JPEG save settings for
|
||||
one file do not affect other files saved later.
|
||||
|
||||
2007-09-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/gui/gtk-macmenu.[ch]: removed...
|
||||
|
|
|
@ -269,8 +269,10 @@ load_image (const gchar *filename,
|
|||
|
||||
if (marker->marker == JPEG_COM)
|
||||
{
|
||||
#ifdef GIMP_UNSTABLE
|
||||
g_print ("jpeg-load: found image comment (%d bytes)\n",
|
||||
marker->data_length);
|
||||
#endif
|
||||
|
||||
if (! comment_buffer)
|
||||
{
|
||||
|
@ -287,8 +289,10 @@ load_image (const gchar *filename,
|
|||
&& (len > sizeof (JPEG_APP_HEADER_EXIF) + 8)
|
||||
&& ! strcmp (JPEG_APP_HEADER_EXIF, data))
|
||||
{
|
||||
#ifdef GIMP_UNSTABLE
|
||||
g_print ("jpeg-load: found EXIF block (%d bytes)\n",
|
||||
(gint) (len - sizeof (JPEG_APP_HEADER_EXIF)));
|
||||
#endif
|
||||
#ifdef HAVE_EXIF
|
||||
if (! exif_data)
|
||||
exif_data = exif_data_new ();
|
||||
|
@ -338,9 +342,10 @@ load_image (const gchar *filename,
|
|||
gint nreturn_vals;
|
||||
gchar *xmp_packet;
|
||||
|
||||
#ifdef GIMP_UNSTABLE
|
||||
g_print ("jpeg-load: found XMP packet (%d bytes)\n",
|
||||
(gint) (len - sizeof (JPEG_APP_HEADER_XMP)));
|
||||
|
||||
#endif
|
||||
xmp_packet = g_strndup (data + sizeof (JPEG_APP_HEADER_XMP),
|
||||
len - sizeof (JPEG_APP_HEADER_XMP));
|
||||
|
||||
|
|
|
@ -563,7 +563,9 @@ save_image (const gchar *filename,
|
|||
exif_data_save_data (exif_data_tmp, &exif_buf, &exif_buf_len);
|
||||
}
|
||||
|
||||
#ifdef GIMP_UNSTABLE
|
||||
g_print ("jpeg-save: saving EXIF block (%d bytes)\n", exif_buf_len);
|
||||
#endif
|
||||
jpeg_write_marker (&cinfo, JPEG_APP0 + 1, exif_buf, exif_buf_len);
|
||||
|
||||
if (exif_buf)
|
||||
|
@ -574,8 +576,10 @@ save_image (const gchar *filename,
|
|||
/* Step 4.1: Write the comment out - pw */
|
||||
if (image_comment && *image_comment)
|
||||
{
|
||||
#ifdef GIMP_UNSTABLE
|
||||
g_print ("jpeg-save: saving image comment (%d bytes)\n",
|
||||
(int) strlen (image_comment));
|
||||
#endif
|
||||
jpeg_write_marker (&cinfo, JPEG_COM,
|
||||
(guchar *) image_comment, strlen (image_comment));
|
||||
}
|
||||
|
@ -593,8 +597,10 @@ save_image (const gchar *filename,
|
|||
|
||||
xmp_data = ((const gchar *) gimp_parasite_data (parasite)) + 10;
|
||||
xmp_data_size = gimp_parasite_data_size (parasite) - 10;
|
||||
#ifdef GIMP_UNSTABLE
|
||||
g_print ("jpeg-save: saving XMP packet (%d bytes)\n",
|
||||
(int) xmp_data_size);
|
||||
#endif
|
||||
app_block = g_malloc (sizeof (JPEG_APP_HEADER_XMP) + xmp_data_size);
|
||||
memcpy (app_block, JPEG_APP_HEADER_XMP,
|
||||
sizeof (JPEG_APP_HEADER_XMP));
|
||||
|
@ -773,8 +779,6 @@ destroy_preview (void)
|
|||
drawable_global = NULL;
|
||||
}
|
||||
|
||||
g_printerr ("destroy_preview (%d, %d)\n", preview_image_ID, preview_layer_ID);
|
||||
|
||||
if (gimp_image_is_valid (preview_image_ID) &&
|
||||
gimp_drawable_is_valid (preview_layer_ID))
|
||||
{
|
||||
|
|
|
@ -393,15 +393,13 @@ run (const gchar *name,
|
|||
|
||||
case GIMP_RUN_INTERACTIVE:
|
||||
case GIMP_RUN_WITH_LAST_VALS:
|
||||
/* Possibly retrieve data */
|
||||
gimp_get_data (SAVE_PROC, &jsvals);
|
||||
|
||||
/* restore the values found when loading the file (if available) */
|
||||
jpeg_restore_original_settings (orig_image_ID,
|
||||
&orig_quality,
|
||||
&orig_subsmp,
|
||||
&num_quant_tables);
|
||||
|
||||
/* load up the previously used values */
|
||||
/* load up the previously used values (if file was saved once) */
|
||||
parasite = gimp_image_parasite_find (orig_image_ID,
|
||||
"jpeg-save-options");
|
||||
if (parasite)
|
||||
|
@ -441,8 +439,7 @@ run (const gchar *name,
|
|||
jsvals.quality = orig_quality;
|
||||
jsvals.use_orig_quality = TRUE;
|
||||
}
|
||||
if (orig_subsmp == 2
|
||||
|| (orig_subsmp > 0 && jsvals.subsmp == 0))
|
||||
if (orig_subsmp == 2 || (orig_subsmp > 0 && jsvals.subsmp == 0))
|
||||
jsvals.subsmp = orig_subsmp;
|
||||
}
|
||||
break;
|
||||
|
@ -481,16 +478,11 @@ run (const gchar *name,
|
|||
|
||||
if (status == GIMP_PDB_SUCCESS)
|
||||
{
|
||||
if (save_image (param[3].data.d_string,
|
||||
image_ID,
|
||||
drawable_ID,
|
||||
orig_image_ID,
|
||||
FALSE))
|
||||
{
|
||||
/* Store mvals data */
|
||||
gimp_set_data (SAVE_PROC, &jsvals, sizeof (JpegSaveVals));
|
||||
}
|
||||
else
|
||||
if (! save_image (param[3].data.d_string,
|
||||
image_ID,
|
||||
drawable_ID,
|
||||
orig_image_ID,
|
||||
FALSE))
|
||||
{
|
||||
status = GIMP_PDB_EXECUTION_ERROR;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue