[shotwell] Add meta-data for fast JPEG sniffer
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Add meta-data for fast JPEG sniffer
- Date: Wed, 23 Oct 2019 19:52:04 +0000 (UTC)
commit 9dac2366ca1276a335450dc5fc950bd2e8769122
Author: Jens Georg <mail jensge org>
Date: Wed Oct 23 20:56:24 2019 +0200
Add meta-data for fast JPEG sniffer
src/photos/JfifSupport.vala | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/photos/JfifSupport.vala b/src/photos/JfifSupport.vala
index a0c075cb..17b38516 100644
--- a/src/photos/JfifSupport.vala
+++ b/src/photos/JfifSupport.vala
@@ -119,8 +119,13 @@ public class JfifSniffer : GdkSniffer {
private DetectedPhotoInformation? fast_sniff(out bool is_corrupted) throws Error {
var detected = new DetectedPhotoInformation();
- // Rely on GdkSniffer to detect corruption
- is_corrupted = false;
+ detected.metadata = new PhotoMetadata();
+ try {
+ detected.metadata.read_from_file(file);
+ } catch (Error err) {
+ // no metadata detected
+ detected.metadata = null;
+ }
var fins = file.read(null);
var dins = new DataInputStream(fins);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]