getting there

This commit is contained in:
2026-02-20 12:23:23 +01:00
parent 5801b29f22
commit 7beadabb47
12 changed files with 214 additions and 56 deletions

View File

@@ -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());
}
}
}