-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpatch.diff
More file actions
57 lines (57 loc) · 2.86 KB
/
Copy pathpatch.diff
File metadata and controls
57 lines (57 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
diff --git a/patch.diff b/patch.diff
index cd631b1..e69de29 100644
--- a/patch.diff
+++ b/patch.diff
@@ -1,52 +0,0 @@
-<<<<<<< SEARCH
- private static bool IsSvgExtension(string extension) =>
- string.Equals(extension, ".svg", StringComparison.OrdinalIgnoreCase) ||
- string.Equals(extension, ".svgz", StringComparison.OrdinalIgnoreCase);
-
-
- public ObjectBrowser(string searchaddress = "", bool isTestnet = true)
-=======
- private static bool IsSvgExtension(string extension) =>
- string.Equals(extension, ".svg", StringComparison.OrdinalIgnoreCase) ||
- string.Equals(extension, ".svgz", StringComparison.OrdinalIgnoreCase);
-
- private bool IsUnsupportedImageFormat(string filePath)
- {
- try
- {
- if (!System.IO.File.Exists(filePath)) return false;
-
- using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Open, System.IO.FileAccess.Read))
- {
- if (fs.Length < 12) return false;
-
- byte[] header = new byte[12];
- fs.Read(header, 0, 12);
-
- // Check for RIFF WEBP
- if (header[0] == 0x52 && header[1] == 0x49 && header[2] == 0x46 && header[3] == 0x46 && // RIFF
- header[8] == 0x57 && header[9] == 0x45 && header[10] == 0x42 && header[11] == 0x50) // WEBP
- {
- return true;
- }
-
- // Check for ftypavif (AVIF) and other HEIF/HEIC formats
- if (header[4] == 0x66 && header[5] == 0x74 && header[6] == 0x79 && header[7] == 0x70) // ftyp
- {
- if (header[8] == 0x61 && header[9] == 0x76 && header[10] == 0x69 && header[11] == 0x66) return true; // avif
- if (header[8] == 0x6d && header[9] == 0x69 && header[10] == 0x66 && header[11] == 0x31) return true; // mif1
- if (header[8] == 0x6d && header[9] == 0x73 && header[10] == 0x66 && header[11] == 0x31) return true; // msf1
- if (header[8] == 0x68 && header[9] == 0x65 && header[10] == 0x69 && header[11] == 0x63) return true; // heic
- if (header[8] == 0x68 && header[9] == 0x65 && header[10] == 0x69 && header[11] == 0x78) return true; // heix
- if (header[8] == 0x68 && header[9] == 0x65 && header[10] == 0x76 && header[11] == 0x63) return true; // hevc
- if (header[8] == 0x68 && header[9] == 0x65 && header[10] == 0x76 && header[11] == 0x78) return true; // hevx
- }
- }
- }
- catch { }
-
- return false;
- }
-
- public ObjectBrowser(string searchaddress = "", bool isTestnet = true)
->>>>>>> REPLACE