File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ internal class EriMetaData : ImageMetaData
5656
5757 public enum CvType
5858 {
59+ Lossless_EMI = 0x03010000 ,
5960 Lossless_ERI = 0x03020000 ,
6061 DCT_ERI = 0x00000001 ,
6162 LOT_ERI = 0x00000005 ,
@@ -149,13 +150,21 @@ public class EriFormat : ImageFormat
149150 public override string Description { get { return "Entis rasterized image format" ; } }
150151 public override uint Signature { get { return 0x69746e45u ; } } // 'Enti'
151152
153+ public EriFormat ( )
154+ {
155+ Extensions = new [ ] { "eri" , "emi" } ;
156+ Signatures = new uint [ ] { 0x69746E45 , 0x54534956 } ;
157+ }
158+
152159 public override ImageMetaData ReadMetaData ( IBinaryStream stream )
153160 {
154161 var header = stream . ReadHeader ( 0x40 ) ;
155- if ( 0x03000100 != header . ToUInt32 ( 8 ) )
162+ uint id = header . ToUInt32 ( 8 ) ;
163+ if ( 0x03000100 != id && 0x02000100 != id )
156164 return null ;
157- if ( ! header . AsciiEqual ( 0x10 , "Entis Rasterized Image" )
158- && ! header . AsciiEqual ( 0x10 , "Moving Entis Image" ) )
165+ if ( ! header . AsciiEqual ( 0x10 , "Entis Rasterized Image" ) &&
166+ ! header . AsciiEqual ( 0x10 , "Moving Entis Image" ) &&
167+ ! header . AsciiEqual ( 0x10 , "EMSAC-Image" ) )
159168 return null ;
160169 using ( var reader = new EriFile ( stream . AsStream ) )
161170 {
You can’t perform that action at this time.
0 commit comments