mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-23 19:34:15 +08:00
(YKG): fixed header reading.
This commit is contained in:
parent
d74d569d20
commit
339129d7d3
@ -72,19 +72,19 @@ namespace GameRes.Formats.Yuka
|
||||
using (var img = new BinaryStream (reg, file.Name))
|
||||
{
|
||||
var img_header = img.ReadHeader (4);
|
||||
if (header.AsciiEqual ("BM"))
|
||||
if (img_header.AsciiEqual ("BM"))
|
||||
{
|
||||
img.Position = 0;
|
||||
info = Bmp.ReadMetaData (img);
|
||||
ykg.Format = YkgImage.Bmp;
|
||||
}
|
||||
else if (header.AsciiEqual ("\x89PNG"))
|
||||
else if (img_header.AsciiEqual ("\x89PNG"))
|
||||
{
|
||||
img.Position = 0;
|
||||
info = Png.ReadMetaData (img);
|
||||
ykg.Format = YkgImage.Png;
|
||||
}
|
||||
else if (header.AsciiEqual ("\x89GNP"))
|
||||
else if (img_header.AsciiEqual ("\x89GNP"))
|
||||
{
|
||||
using (var body = new StreamRegion (file.AsStream, ykg.DataOffset+4, ykg.DataSize-4, true))
|
||||
using (var pre = new PrefixStream (PngPrefix, body))
|
||||
|
Loading…
x
Reference in New Issue
Block a user