[chronojump] Util methods: IsJpeg() IsPng()
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Util methods: IsJpeg() IsPng()
- Date: Mon, 28 Dec 2020 13:48:09 +0000 (UTC)
commit aec743395a35136c11e8c512028f2ae7832e96e8
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Dec 28 14:47:10 2020 +0100
Util methods: IsJpeg() IsPng()
src/util.cs | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/util.cs b/src/util.cs
index 7e3e4a12..7ce48e0e 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -1172,6 +1172,16 @@ public class Util
* --------------------- End of GetPhoto stuff
*/
+ public static bool IsJpeg(string filename)
+ {
+ return (filename.ToLower().EndsWith("jpeg") || filename.ToLower().EndsWith("jpg"));
+ }
+
+ public static bool IsPng(string filename)
+ {
+ return (filename.ToLower().EndsWith("png"));
+ }
+
/*
* --------------------- Start of video stuff
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]