summaryrefslogtreecommitdiff
path: root/src/photos/PhotoFileFormat.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-09-30 14:11:00 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-09-30 14:11:00 +0200
commit0ac947a9070322180e94d1b71e30836cce4d74bc (patch)
tree4a6f3923c250377536a5004ed203768111a1d27f /src/photos/PhotoFileFormat.vala
parenteca5837e235a356c8db9416bbbc13577db3e6f76 (diff)
parent01b2b5ec9177046f64c6d0a6e73a6ac8a42089a1 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/photos/PhotoFileFormat.vala')
-rw-r--r--src/photos/PhotoFileFormat.vala23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/photos/PhotoFileFormat.vala b/src/photos/PhotoFileFormat.vala
index 725bd1d..e642008 100644
--- a/src/photos/PhotoFileFormat.vala
+++ b/src/photos/PhotoFileFormat.vala
@@ -57,12 +57,13 @@ public enum PhotoFileFormat {
PNG,
TIFF,
BMP,
+ GIF,
UNKNOWN;
// This is currently listed in the order of detection, that is, the file is examined from
// left to right. (See PhotoFileInterrogator.)
public static PhotoFileFormat[] get_supported() {
- return { JFIF, RAW, PNG, TIFF, BMP };
+ return { JFIF, RAW, PNG, TIFF, BMP, GIF };
}
public static PhotoFileFormat[] get_writeable() {
@@ -137,6 +138,9 @@ public enum PhotoFileFormat {
case BMP:
return 4;
+
+ case GIF:
+ return 5;
case UNKNOWN:
default:
@@ -161,6 +165,9 @@ public enum PhotoFileFormat {
case 4:
return BMP;
+
+ case 5:
+ return GIF;
default:
return UNKNOWN;
@@ -184,7 +191,9 @@ public enum PhotoFileFormat {
case GPhoto.MIME.BMP:
return PhotoFileFormat.BMP;
-
+
+ // GPhoto does not have GIF
+
default:
// check file extension against those we support
return PhotoFileFormat.UNKNOWN;
@@ -205,6 +214,9 @@ public enum PhotoFileFormat {
case "bmp":
return PhotoFileFormat.BMP;
+
+ case "gif":
+ return PhotoFileFormat.GIF;
default:
return PhotoFileFormat.UNKNOWN;
@@ -233,6 +245,10 @@ public enum PhotoFileFormat {
Photos.BmpFileFormatDriver.init();
break;
+ case GIF:
+ Photos.GifFileFormatDriver.init();
+ break;
+
default:
error("Unsupported file format %s", this.to_string());
}
@@ -255,6 +271,9 @@ public enum PhotoFileFormat {
case BMP:
return Photos.BmpFileFormatDriver.get_instance();
+ case GIF:
+ return Photos.GifFileFormatDriver.get_instance();
+
default:
error("Unsupported file format %s", this.to_string());
}