diff --git a/ArcFormats/ImageMB.cs b/ArcFormats/ImageMB.cs index b4539992..39925bdc 100644 --- a/ArcFormats/ImageMB.cs +++ b/ArcFormats/ImageMB.cs @@ -36,12 +36,26 @@ namespace GameRes.Formats public override uint Signature { get { return 0; } } public override bool CanWrite { get { return true; } } + public MbImageFormat () + { + Extensions = new[] { "bmp", "gra" }; + } + public override ImageMetaData ReadMetaData (IBinaryStream stream) { int c1 = stream.ReadByte(); int c2 = stream.ReadByte(); - if ('M' != c1 || ('B' != c2 && 'C' != c2)) - return null; + switch (c1) + { + case 'M': + if ('B' != c2 && 'C' != c2) + return null; + break; + case 'C': + if ('L' != c2) + return null; + break; + } using (var bmp = OpenAsBitmap (stream)) return Bmp.ReadMetaData (bmp); }