[gegl] jpg-save: Add optimize property



commit 4388fc0b901de283dd60778233f449aafa5f981b
Author: Mukund Sivaraman <muks banu com>
Date:   Sun Jun 12 14:55:39 2011 +0530

    jpg-save: Add optimize property

 operations/workshop/external/jpg-save.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/operations/workshop/external/jpg-save.c b/operations/workshop/external/jpg-save.c
index 502ad1d..7968ea2 100644
--- a/operations/workshop/external/jpg-save.c
+++ b/operations/workshop/external/jpg-save.c
@@ -30,7 +30,9 @@ gegl_chant_int    (quality, _("Quality"),
 gegl_chant_int    (smoothing, _("Smoothing"),
                    0, 100, 0, _("Smoothing factor from 1 to 100; 0 disables smoothing"))
 gegl_chant_boolean (progressive, _("Progressive"), TRUE,
-                    _("Whether to create progressive JPEGs"))
+                    _("Whether to create progressive JPEG images"))
+gegl_chant_boolean (optimize, _("Optimize"), TRUE,
+                    _("Whether to create optimized JPEG images"))
 
 #else
 
@@ -49,6 +51,7 @@ gegl_buffer_export_jpeg (GeglBuffer  *gegl_buffer,
                          gint         quality,
                          gint         smoothing,
                          gboolean     progressive,
+                         gboolean     optimize,
                          gint         src_x,
                          gint         src_y,
                          gint         width,
@@ -81,7 +84,7 @@ gegl_buffer_export_jpeg (GeglBuffer  *gegl_buffer,
   jpeg_set_quality (&cinfo, quality, TRUE);
 
   cinfo.smoothing_factor = smoothing;
-  cinfo.optimize_coding = TRUE;
+  cinfo.optimize_coding = optimize;
 
   if (progressive)
     jpeg_simple_progression (&cinfo);
@@ -137,7 +140,7 @@ process (GeglOperation       *operation,
   GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
 
   gegl_buffer_export_jpeg (input, o->path, o->quality,
-                           o->smoothing, o->progressive,
+                           o->smoothing, o->progressive, o->optimize,
                            result->x, result->y,
                            result->width, result->height);
   return  TRUE;



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