[gnome-photos/wip/rishi/misc-fixes: 21/21] base-item: Save JPEGs at	quality=90
- From: Debarshi Ray <debarshir src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-photos/wip/rishi/misc-fixes: 21/21] base-item: Save JPEGs at	quality=90
 
- Date: Thu, 24 Dec 2015 02:31:58 +0000 (UTC)
 
commit 7bfa1eb086eba78e07012ea36118f40425d20feb
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Dec 24 02:26:02 2015 +0100
    base-item: Save JPEGs at quality=90
 src/photos-base-item.c |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 421569b..a9e8c65 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -1076,13 +1076,27 @@ photos_base_item_save_replace (GObject *source_object, GAsyncResult *res, gpoint
       goto out;
     }
 
-  gdk_pixbuf_save_to_stream_async (pixbuf,
-                                   G_OUTPUT_STREAM (stream),
-                                   type,
-                                   cancellable,
-                                   photos_base_item_save_save_to_stream,
-                                   g_object_ref (task),
-                                   NULL);
+  if (g_strcmp0 (type, "jpeg") == 0)
+    {
+      gdk_pixbuf_save_to_stream_async (pixbuf,
+                                       G_OUTPUT_STREAM (stream),
+                                       type,
+                                       cancellable,
+                                       photos_base_item_save_save_to_stream,
+                                       g_object_ref (task),
+                                       "quality", "90",
+                                       NULL);
+    }
+  else
+    {
+      gdk_pixbuf_save_to_stream_async (pixbuf,
+                                       G_OUTPUT_STREAM (stream),
+                                       type,
+                                       cancellable,
+                                       photos_base_item_save_save_to_stream,
+                                       g_object_ref (task),
+                                       NULL);
+    }
 
  out:
   g_clear_object (&pixbuf);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]