feat: MAGES PS3/PSV Image Format decoding

This commit is contained in:
ManicSteiner
2023-12-09 23:48:09 +08:00
parent 8188874e81
commit d4cde67f43
3 changed files with 117 additions and 0 deletions

View File

@@ -65,6 +65,16 @@ namespace GameRes.Formats.BGI
return null;
if (0 != stream.ReadInt64())
return null;
if (flag == 0)
{
int stride = (int)width * ((bpp + 7) / 8);
var pixels = new byte[stride * (int)height];
int read = stream.Read(pixels, 0, pixels.Length);
if (read != pixels.Length)
return null;
}
return new BgiMetaData
{
Width = (uint)width,