mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-23 19:34:15 +08:00
(BMP): inverted alpha channel.
commented out for now, as there's no way to correctly recognize it.
This commit is contained in:
parent
e14b7e444c
commit
e68b7a5ede
@ -220,6 +220,13 @@ namespace GameRes
|
||||
file.Read (pixels, dst, stride);
|
||||
for (int x = 3; !has_alpha && x < stride; x += 4)
|
||||
has_alpha = pixels[dst+x] != 0;
|
||||
/* // sometimes alpha channel is inverted
|
||||
for (int x = 3; x < stride; x += 4)
|
||||
{
|
||||
pixels[dst+x] ^= 0xFF;
|
||||
has_alpha = has_alpha || pixels[dst+x] != 0;
|
||||
}
|
||||
*/
|
||||
}
|
||||
PixelFormat format = has_alpha ? PixelFormats.Bgra32 : PixelFormats.Bgr32;
|
||||
return ImageData.Create (info, format, null, pixels, stride);
|
||||
|
Loading…
x
Reference in New Issue
Block a user