mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 12:39:16 +08:00
(ImageData.CreateFlipped): new static method.
This commit is contained in:
parent
42fdf330ee
commit
43b1631e67
@ -99,6 +99,16 @@ namespace GameRes
|
|||||||
{
|
{
|
||||||
return Create (info, format, palette, pixel_data, (int)info.Width*((format.BitsPerPixel+7)/8));
|
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)
|
||||||
|
{
|
||||||
|
var bitmap = BitmapSource.Create ((int)info.Width, (int)info.Height, DefaultDpiX, DefaultDpiY,
|
||||||
|
format, palette, pixel_data, stride);
|
||||||
|
var flipped = new TransformedBitmap (bitmap, new ScaleTransform { ScaleY = -1 });
|
||||||
|
flipped.Freeze();
|
||||||
|
return new ImageData (flipped, info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class ImageFormat : IResource
|
public abstract class ImageFormat : IResource
|
||||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion ("1.2.8.108")]
|
[assembly: AssemblyVersion ("1.2.8.110")]
|
||||||
[assembly: AssemblyFileVersion ("1.2.8.108")]
|
[assembly: AssemblyFileVersion ("1.2.8.110")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user