Add more NetPBM variants

This commit is contained in:
gingerBill
2022-05-14 14:26:11 +01:00
parent f17a9dd5e7
commit 9921ac01cc
+5 -1
View File
@@ -14,7 +14,7 @@ Which_File_Type :: enum {
JPEG, JPEG,
JPEG_2000, JPEG_2000,
JPEG_XL, JPEG_XL,
PBM, PGM, PPM, // NetPBM family PBM, PGM, PPM, PAM, PFM, // NetPBM family
PIC, // Softimage PIC PIC, // Softimage PIC
PNG, // Portable Network Graphics PNG, // Portable Network Graphics
PSD, // Photoshop PSD PSD, // Photoshop PSD
@@ -117,6 +117,10 @@ which_bytes :: proc(data: []byte) -> Which_File_Type {
return .PGM return .PGM
case '3', '6': case '3', '6':
return .PPM return .PPM
case '7':
return .PAM
case 'f', 'F':
return .PFM
} }
} }
case s[:8] == "\x89PNG\r\n\x1a\n": case s[:8] == "\x89PNG\r\n\x1a\n":