[gegl] jpg-save: Add smoothing property
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] jpg-save: Add smoothing property
- Date: Thu, 8 Sep 2011 06:55:00 +0000 (UTC)
commit 20de28358482bf6cab857185a2c6daf321d376d6
Author: Mukund Sivaraman <muks banu com>
Date: Thu Sep 8 12:22:50 2011 +0530
jpg-save: Add smoothing property
operations/external/jpg-save.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/operations/external/jpg-save.c b/operations/external/jpg-save.c
index bd500dc..16ed185 100644
--- a/operations/external/jpg-save.c
+++ b/operations/external/jpg-save.c
@@ -26,6 +26,8 @@ gegl_chant_string (path, _("File"), "",
_("Target path and filename, use '-' for stdout."))
gegl_chant_int (quality, _("Quality"), 1, 100, 90,
_("JPEG compression quality (between 1 and 100)"))
+gegl_chant_int (smoothing, _("Smoothing"),
+ 0, 100, 0, _("Smoothing factor from 1 to 100; 0 disables smoothing"))
gegl_chant_boolean (optimize, _("Optimize"), TRUE,
_("Use optimized huffman tables"))
gegl_chant_boolean (progressive, _("Progressive"), TRUE,
@@ -44,6 +46,7 @@ static gint
gegl_buffer_export_jpg (GeglBuffer *gegl_buffer,
const gchar *path,
gint quality,
+ gint smoothing,
gboolean optimize,
gboolean progressive,
gint src_x,
@@ -82,6 +85,7 @@ gegl_buffer_export_jpg (GeglBuffer *gegl_buffer,
jpeg_set_defaults (&cinfo);
jpeg_set_quality (&cinfo, quality, TRUE);
+ cinfo.smoothing_factor = smoothing;
cinfo.optimize_coding = optimize;
if (progressive)
jpeg_simple_progression (&cinfo);
@@ -123,7 +127,7 @@ gegl_jpg_save_process (GeglOperation *operation,
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
- gegl_buffer_export_jpg (input, o->path, o->quality,
+ gegl_buffer_export_jpg (input, o->path, o->quality, o->smoothing,
o->optimize, o->progressive,
result->x, result->y,
result->width, result->height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]