Browse Source

Add more NetPBM variants

gingerBill 3 years ago
parent
commit
9921ac01cc
1 changed files with 5 additions and 1 deletions
  1. 5 1
      core/image/which.odin

+ 5 - 1
core/image/which.odin

@@ -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":