summaryrefslogtreecommitdiff
path: root/src/photos/PngSupport.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-23 09:36:56 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-23 09:36:56 +0200
commit8004f1a7ad3cc6a3659517f3374bdf1b63416b24 (patch)
treeb7b82cc6e01cd47d22f660e25508a7d8d555dc89 /src/photos/PngSupport.vala
parent28c68a75acac7ac3ce7fb169bc6aa65e16551c53 (diff)
parent566dc060676b41e1e58a446b7dcc4159e242fee6 (diff)
Merge tag 'upstream/0.20.0'
Upstream version 0.20.0
Diffstat (limited to 'src/photos/PngSupport.vala')
-rw-r--r--src/photos/PngSupport.vala11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/photos/PngSupport.vala b/src/photos/PngSupport.vala
index ffc7faa..2cde6a2 100644
--- a/src/photos/PngSupport.vala
+++ b/src/photos/PngSupport.vala
@@ -69,14 +69,17 @@ public class PngSniffer : GdkSniffer {
return true;
}
- public override DetectedPhotoInformation? sniff() throws Error {
+ public override DetectedPhotoInformation? sniff(out bool is_corrupted) throws Error {
+ // Rely on GdkSniffer to detect corruption
+ is_corrupted = false;
+
if (!is_png_file(file))
return null;
-
- DetectedPhotoInformation? detected = base.sniff();
+
+ DetectedPhotoInformation? detected = base.sniff(out is_corrupted);
if (detected == null)
return null;
-
+
return (detected.file_format == PhotoFileFormat.PNG) ? detected : null;
}
}