[chronojump/optimizeRFD] Util methods: IsJpeg() IsPng()
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/optimizeRFD] Util methods: IsJpeg() IsPng()
- Date: Sun, 3 Jan 2021 17:07:55 +0000 (UTC)
commit 3bbc11998388234b600484bfb90759e3add390bc
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 7e3e4a12b..7ce48e0eb 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]