[shotwell] graw: Prevent array duplication when parsing thumb from raw



commit 98a7e42ac2fa9c293aecc5a7b199ace85b4638af
Author: Jens Georg <mail jensge org>
Date:   Sat Jun 25 20:09:49 2016 +0200

    graw: Prevent array duplication when parsing thumb from raw
    
    Signed-off-by: Jens Georg <mail jensge org>

 src/photos/GRaw.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/photos/GRaw.vala b/src/photos/GRaw.vala
index 53c328c..ec1df8d 100644
--- a/src/photos/GRaw.vala
+++ b/src/photos/GRaw.vala
@@ -125,7 +125,8 @@ public class ProcessedImage {
         // to be decoded before being useful.  This will throw an error if the format is not
         // supported
         try {
-            pixbuf = new Gdk.Pixbuf.from_stream(new MemoryInputStream.from_data(image.data, null),
+            var bytes = new Bytes.static (image.data);
+            pixbuf = new Gdk.Pixbuf.from_stream(new MemoryInputStream.from_bytes(bytes),
                 null);
         } catch (Error err) {
             throw new Exception.UNSUPPORTED_THUMBNAIL(err.message);


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