mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(ImageFormat.Write): use overloaded BitmapFrame.Create method.
incorrect metadata sometimes causes ArgumentException.
This commit is contained in:
@@ -52,7 +52,7 @@ namespace GameRes
|
||||
public override void Write (Stream file, ImageData image)
|
||||
{
|
||||
var encoder = new PngBitmapEncoder();
|
||||
encoder.Frames.Add (BitmapFrame.Create (image.Bitmap));
|
||||
encoder.Frames.Add (BitmapFrame.Create (image.Bitmap, null, null, null));
|
||||
if (0 == image.OffsetX && 0 == image.OffsetY)
|
||||
{
|
||||
encoder.Save (file);
|
||||
|
||||
Reference in New Issue
Block a user