getting there
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
|
||||
public void CopyRegion(UInt16 source_x, UInt16 source_y, UInt16 width, UInt16 height, UInt16 target_x, UInt16 target_y) => this.SetRegion(this._frame, source_x, source_y, width, height, target_x, target_y);
|
||||
|
||||
public void SaveBitmap(String filename)
|
||||
public Byte[] ToBitmap()
|
||||
{
|
||||
#warning Endianness is straight up ignored
|
||||
Int32 rowBytes = (this.Width * 3) + 3;
|
||||
@@ -72,7 +72,12 @@
|
||||
buf[pos + 2] = this._frame[this.Height - j - 1][i].Red;
|
||||
}
|
||||
}
|
||||
File.WriteAllBytes(filename, buf);
|
||||
return buf;
|
||||
}
|
||||
|
||||
public void SaveBitmap(String filename)
|
||||
{
|
||||
File.WriteAllBytes(filename, this.ToBitmap());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user