[shotwell] Remove postfix trimming of thumbs on Canon files



commit dcd71fed6848ce8f6d3422f429bd2bb00616d2f2
Author: Peter Seiderer <ps report gmx net>
Date:   Sun Feb 5 00:08:00 2012 +0000

    Remove postfix trimming of thumbs on Canon files
    
    Apparently, exiv2 now also gets them out of the images, breaking the
    duplicate detection (for Canon cameras)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=717735

 src/camera/GPhoto.vala |   22 +---------------------
 1 files changed, 1 insertions(+), 21 deletions(-)
---
diff --git a/src/camera/GPhoto.vala b/src/camera/GPhoto.vala
index a3c225a..39b2109 100644
--- a/src/camera/GPhoto.vala
+++ b/src/camera/GPhoto.vala
@@ -182,27 +182,7 @@ namespace GPhoto {
             preview_md5 = Checksum.compute_for_bytes(ChecksumType.MD5, raw);
         }
         
-        // Try to make sure last two bytes are JPEG footer.
-        // This is necessary because GPhoto sometimes includes a few extra bytes. See
-        // Yorba bug #2905 and the following GPhoto bug:
-        // http://sourceforge.net/tracker/?func=detail&aid=3141521&group_id=8874&atid=108874
-
-        var raw_length = raw.get_size ();
-        if (raw_length > 32) {
-            for (var i = raw_length - 2; i > raw_length - 32; i--) {
-                if (raw.get((int) i) == Jpeg.MARKER_PREFIX && raw.get((int) i + 1) == Jpeg.Marker.EOI) {
-                    debug("Adjusted length of thumbnail for: %s", filename);
-                    raw_length = i + 2;
-                    break;
-                }
-            }
-        }
-
-        if (raw_length != raw.get_size()) {
-            out_bytes = new Bytes.from_bytes (raw, 0, raw_length);
-        } else {
-            out_bytes = raw;
-        }
+        out_bytes = raw;
         preview_md5 = Checksum.compute_for_bytes(ChecksumType.MD5, out_bytes);
 
         MemoryInputStream mins = new MemoryInputStream.from_bytes (raw);


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