aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-05-14 15:32:28 +0100
committergingerBill <bill@gingerbill.org>2022-05-14 15:32:28 +0100
commitf7b18cd86ebce34f4b62ba313a998bc45c513d04 (patch)
treea4d22c272c0a6b8c72aab9519e1af0aab1709304
parentd74e4b427d873b56bf6069c674107197fc44774b (diff)
Add DjVu
-rw-r--r--core/image/which.odin6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/image/which.odin b/core/image/which.odin
index 82cb03ce6..ab608174f 100644
--- a/core/image/which.odin
+++ b/core/image/which.odin
@@ -6,6 +6,7 @@ Which_File_Type :: enum {
Unknown,
BMP,
+ DjVu, // AT&T DjVu file format
EXR,
FLIF,
GIF,
@@ -88,6 +89,11 @@ which_bytes :: proc(data: []byte) -> Which_File_Type {
switch {
case s[:2] == "BM":
return .BMP
+ case s[:8] == "AT&TFORM":
+ switch s[12:16] {
+ case "DJVU", "DJVM":
+ return .DjVu
+ }
case s[:4] == "\x76\x2f\x31\x01":
return .EXR
case s[:6] == "GIF87a", s[:6] == "GIF89a":