@@ -14,7 +14,6 @@ add_format(format"NRRD", "NRRD", [".nrrd", ".nhdr"], [:NRRD])
14
14
add_format (format " AndorSIF" , " Andor Technology Multi-Channel File" , " .sif" , [:AndorSIF , LOAD])
15
15
16
16
17
- add_format (format " AVI" , UInt8[0x52 ,0x49 ,0x46 ,0x46 ], " .avi" , [:ImageMagick ])
18
17
add_format (format " CRW" , UInt8[0x49 ,0x49 ,0x1a ,0x00 ,0x00 ,0x00 ,0x48 ,0x45 ], " .crw" , [:ImageMagick ])
19
18
add_format (format " CUR" , UInt8[0x00 ,0x00 ,0x02 ,0x00 ], " .cur" , [:ImageMagick ])
20
19
add_format (format " DCX" , UInt8[0xb1 ,0x68 ,0xde ,0x3a ], " .dcx" , [:ImageMagick ])
@@ -100,6 +99,19 @@ add_format(format"OFF", "OFF", ".off", [:MeshIO])
100
99
101
100
102
101
# ## Complex cases
102
+
103
+ # AVI is a subtype of RIFF, as is WAV
104
+ function detectavi (io)
105
+ seekstart (io)
106
+ magic = ascii (read (io, UInt8, 4 ))
107
+ magic == " RIFF" || return false
108
+ seek (s, 8 )
109
+ submagic = ascii (read (io, UInt8, 4 ))
110
+
111
+ submagic == " AVI "
112
+ end
113
+ add_format (format " AVI" , detectavi, " .avi" , [:ImageMagick ])
114
+
103
115
# HDF5: the complication is that the magic bytes may start at
104
116
# 0, 512, 1024, 2048, or any multiple of 2 thereafter
105
117
h5magic = (0x89 ,0x48 ,0x44 ,0x46 ,0x0d ,0x0a ,0x1a ,0x0a )
0 commit comments