mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
bunch of stuff.
This commit is contained in:
@@ -64,7 +64,12 @@ namespace GameRes.Formats.Nonono
|
||||
using (var input = new MemoryStream (bitmap, header_size, bitmap.Length - header_size))
|
||||
{
|
||||
if (8 == m_info.BPP)
|
||||
palette = ImageFormat.ReadPalette (input);
|
||||
{
|
||||
int num_colors = bitmap.ToInt32 (0x20);
|
||||
if (0 == num_colors)
|
||||
num_colors = 0x100;
|
||||
palette = ImageFormat.ReadPalette (input, num_colors);
|
||||
}
|
||||
input.Read (pixels, 0, pixels.Length);
|
||||
}
|
||||
PixelFormat format = 8 == m_info.BPP ? PixelFormats.Indexed8
|
||||
|
||||
Reference in New Issue
Block a user