mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 07:34:00 +08:00
(ImageData.Create): accept Array object as pixels array.
This commit is contained in:
parent
af46fefc39
commit
73c4688148
@ -99,7 +99,7 @@ namespace GameRes
|
||||
}
|
||||
|
||||
public static ImageData Create (ImageMetaData info, PixelFormat format, BitmapPalette palette,
|
||||
byte[] pixel_data, int stride)
|
||||
Array pixel_data, int stride)
|
||||
{
|
||||
var bitmap = BitmapSource.Create ((int)info.Width, (int)info.Height, DefaultDpiX, DefaultDpiY,
|
||||
format, palette, pixel_data, stride);
|
||||
@ -108,13 +108,13 @@ namespace GameRes
|
||||
}
|
||||
|
||||
public static ImageData Create (ImageMetaData info, PixelFormat format, BitmapPalette palette,
|
||||
byte[] pixel_data)
|
||||
Array pixel_data)
|
||||
{
|
||||
return Create (info, format, palette, pixel_data, (int)info.Width*((format.BitsPerPixel+7)/8));
|
||||
}
|
||||
|
||||
public static ImageData CreateFlipped (ImageMetaData info, PixelFormat format, BitmapPalette palette,
|
||||
byte[] pixel_data, int stride)
|
||||
Array pixel_data, int stride)
|
||||
{
|
||||
var bitmap = BitmapSource.Create ((int)info.Width, (int)info.Height, DefaultDpiX, DefaultDpiY,
|
||||
format, palette, pixel_data, stride);
|
||||
|
Loading…
Reference in New Issue
Block a user