[gimp/gimp-2-8] Bug 694340 - EPS resolution capped @ 1440 on import



commit c086e98029411c8c4c78e166e697aad8a5686e92
Author: Michael Natterer <mitch gimp org>
Date:   Sat Feb 22 09:40:49 2014 +0100

    Bug 694340 - EPS resolution capped @ 1440 on import
    
    Increase to 8192 which is just as arbitrary but more reasonable.
    
    (cherry picked from commit ee772d398ffeed75b8ab1420c531fc1cae74ec32)

 plug-ins/common/file-ps.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/plug-ins/common/file-ps.c b/plug-ins/common/file-ps.c
index 6bd59c9..8c91829 100644
--- a/plug-ins/common/file-ps.c
+++ b/plug-ins/common/file-ps.c
@@ -105,7 +105,9 @@ static const gchar dversio[] = "v1.17  19-Sep-2004";
 #define PLUG_IN_ROLE         "gimp-file-ps"
 
 
-#define STR_LENGTH 64
+#define STR_LENGTH     64
+#define MIN_RESOLUTION 5
+#define MAX_RESOLUTION 8192
 
 /* Load info */
 typedef struct
@@ -1228,10 +1230,10 @@ save_image (const gchar  *filename,
 static void
 check_load_vals (void)
 {
-  if (plvals.resolution < 5)
-    plvals.resolution = 5;
-  else if (plvals.resolution > 1440)
-    plvals.resolution = 1440;
+  if (plvals.resolution < MIN_RESOLUTION)
+    plvals.resolution = MIN_RESOLUTION;
+  else if (plvals.resolution > MAX_RESOLUTION)
+    plvals.resolution = MAX_RESOLUTION;
 
   if (plvals.width < 2)
     plvals.width = 2;
@@ -3015,7 +3017,8 @@ load_dialog (const gchar *filename,
   gtk_widget_show (table);
 
   spinbutton = gimp_spin_button_new (&adj, plvals.resolution,
-                                     5, 1440, 1, 10, 0, 1, 0);
+                                     MIN_RESOLUTION, MAX_RESOLUTION,
+                                     1, 10, 0, 1, 0);
   gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
                              _("Resolution:"), 0.0, 0.5,
                              spinbutton, 1, FALSE);
@@ -3029,7 +3032,6 @@ load_dialog (const gchar *filename,
                     &plvals.resolution);
 
 
-
   ps_width_spinbutton = gimp_spin_button_new (&adj, plvals.width,
                                               1, GIMP_MAX_IMAGE_SIZE,
                                               1, 10, 0, 1, 0);


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