gimp r27126 - in trunk: . plug-ins/file-jpeg



Author: neo
Date: Sat Oct  4 21:12:14 2008
New Revision: 27126
URL: http://svn.gnome.org/viewvc/gimp?rev=27126&view=rev

Log:
2008-10-04  Sven Neumann  <sven gimp org>

	* plug-ins/file-jpeg/jpeg-save.c: some cleanups to the 
subsampling
	code; in an attempt to fix bug #555031.



Modified:
   trunk/ChangeLog
   trunk/plug-ins/file-jpeg/jpeg-save.c

Modified: trunk/plug-ins/file-jpeg/jpeg-save.c
==============================================================================
--- trunk/plug-ins/file-jpeg/jpeg-save.c	(original)
+++ trunk/plug-ins/file-jpeg/jpeg-save.c	Sat Oct  4 21:12:14 2008
@@ -399,8 +399,11 @@
                  jsvals.subsmp : JPEG_SUPSAMPLING_1x1_1x1_1x1);
 
   /*  smoothing is not supported with nonstandard sampling ratios  */
-  if (subsampling != 1 && subsampling != 3)
-    cinfo.smoothing_factor = (gint) (jsvals.smoothing * 100);
+  if (subsampling != JPEG_SUPSAMPLING_2x1_1x1_1x1 &&
+      subsampling != JPEG_SUPSAMPLING_1x2_1x1_1x1)
+    {
+      cinfo.smoothing_factor = (gint) (jsvals.smoothing * 100);
+    }
 
   if (jsvals.progressive)
     {
@@ -1098,13 +1101,7 @@
 
   gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo);
 
-  gimp_int_combo_box_connect (GIMP_INT_COMBO_BOX (combo),
-                              gimp_drawable_is_rgb (drawable_ID_global) ?
-                              jsvals.subsmp : JPEG_SUPSAMPLING_1x1_1x1_1x1,
-                              G_CALLBACK (subsampling_changed),
-                              entry);
-
-  if ( gimp_drawable_is_rgb (drawable_ID_global))
+  if (gimp_drawable_is_rgb (drawable_ID_global))
     {
       gimp_int_combo_box_connect (GIMP_INT_COMBO_BOX (combo),
                                   jsvals.subsmp,
@@ -1117,7 +1114,8 @@
     }
   else
     {
-      gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo), 2);
+      gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo),
+                                     JPEG_SUPSAMPLING_1x1_1x1_1x1);
 
       gtk_widget_set_sensitive (combo, FALSE);
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]