a2822c
diff --git a/magic/Magdir/images b/magic/Magdir/images
a2822c
index e94905c..a25d292 100644
a2822c
--- a/magic/Magdir/images
a2822c
+++ b/magic/Magdir/images
a2822c
@@ -32,17 +32,42 @@
a2822c
 
a2822c
 # PBMPLUS images
a2822c
 # The next byte following the magic is always whitespace.
a2822c
-0	search/1	P1		Netpbm PBM image text
a2822c
+# strength is changed to try these patterns before "x86 boot sector"
a2822c
+0	search/1	P1		
a2822c
+>3	regex		=[0-9]*\ [0-9]*		Netpbm PBM image text
a2822c
+>3	regex		=[0-9]+\ 		\b, size = %sx
a2822c
+>>3	regex		=\ [0-9]+	\b%s
a2822c
+!:strength + 45
a2822c
 !:mime	image/x-portable-bitmap
a2822c
-0	search/1b	P2		Netpbm PGM image text
a2822c
+0	search/1	P2		
a2822c
+>3	regex		=[0-9]*\ [0-9]*		Netpbm PGM image text
a2822c
+>3	regex		=[0-9]+\ 		\b, size = %sx
a2822c
+>>3	regex		=\ [0-9]+	\b%s
a2822c
+!:strength + 45
a2822c
 !:mime	image/x-portable-greymap
a2822c
 0	search/1	P3		Netpbm PPM image text
a2822c
+>3	regex		=[0-9]*\ [0-9]*		Netpbm PPM image text
a2822c
+>3	regex		=[0-9]+\ 		\b, size = %sx
a2822c
+>>3	regex		=\ [0-9]+	\b%s
a2822c
+!:strength + 45
a2822c
 !:mime	image/x-portable-pixmap
a2822c
-0	string		P4		Netpbm PBM "rawbits" image data
a2822c
+0	string		P4		
a2822c
+>3	regex		=[0-9]*\ [0-9]*		Netpbm PBM "rawbits" image data
a2822c
+>3	regex		=[0-9]+\ 		\b, size = %sx
a2822c
+>>3	regex		=\ [0-9]+	\b%s
a2822c
+!:strength + 45
a2822c
 !:mime	image/x-portable-bitmap
a2822c
-0	string		P5		Netpbm PGM "rawbits" image data
a2822c
+0	string		P5		
a2822c
+>3	regex		=[0-9]*\ [0-9]*		Netpbm PGM "rawbits" image data
a2822c
+>3	regex		=[0-9]+\ 		\b, size = %sx
a2822c
+>>3	regex		=\ [0-9]+	\b%s
a2822c
+!:strength + 45
a2822c
 !:mime	image/x-portable-greymap
a2822c
-0	string		P6		Netpbm PPM "rawbits" image data
a2822c
+0	string		P6		
a2822c
+>3	regex		=[0-9]*\ [0-9]*		Netpbm PPM "rawbits" image data
a2822c
+>3	regex		=[0-9]+\ 		\b, size = %sx
a2822c
+>>3	regex		=\ [0-9]+	\b%s
a2822c
+!:strength + 45
a2822c
 !:mime	image/x-portable-pixmap
a2822c
 0	string		P7		Netpbm PAM image file
a2822c
 !:mime	image/x-portable-pixmap