Skip to content

Commit e201687

Browse files
authored
Merge pull request #20 from Bioruebe/master
Added support for WebP and HEIC images
2 parents 0d75656 + 987747e commit e201687

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

src/model/pattern-tree.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,43 @@ add(
106106
{ mime: "image/jpeg", extension: "jpeg" }
107107
);
108108

109+
add("webp", [
110+
"0x52",
111+
"0x49",
112+
"0x46",
113+
"0x46",
114+
"?",
115+
"?",
116+
"?",
117+
"?",
118+
"0x57",
119+
"0x45",
120+
"0x42",
121+
"0x50"
122+
], { mime: "image/webp", extension: "webp" });
123+
124+
add("heif", [
125+
"0x66",
126+
"0x74",
127+
"0x79",
128+
"0x70",
129+
"0x6D",
130+
"0x69",
131+
"0x66",
132+
"0x31"
133+
], { mime: "image/heif", extension: "heif" }, 4);
134+
135+
add("heif", [
136+
"0x66",
137+
"0x74",
138+
"0x79",
139+
"0x70",
140+
"0x68",
141+
"0x65",
142+
"0x69",
143+
"0x63"
144+
], { mime: "image/heif", extension: "heic" }, 4);
145+
109146
add("rpm", ["0xed", "0xab", "0xee", "0xdb"]);
110147
add("bin", ["0x53", "0x50", "0x30", "0x31"], { mime: "application/octet-stream", extension: "bin"});
111148
add("pic", ["0x00"]);

0 commit comments

Comments
 (0)