mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
Fixed #570
This commit is contained in:
parent
ef38471ff1
commit
1766dcbdeb
@ -37,10 +37,10 @@ namespace AssetStudio
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var handle = GCHandle.Alloc(buff, GCHandleType.Pinned);
|
||||
var scan0 = handle.AddrOfPinnedObject();
|
||||
var bitmap = new Bitmap(m_Width, m_Height, m_Width * 4, PixelFormat.Format32bppArgb, scan0);
|
||||
handle.Free();
|
||||
var bitmap = new Bitmap(m_Width, m_Height, PixelFormat.Format32bppArgb);
|
||||
var bmpData = bitmap.LockBits(new Rectangle(0, 0, m_Width, m_Height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
|
||||
Marshal.Copy(buff, 0, bmpData.Scan0, buff.Length);
|
||||
bitmap.UnlockBits(bmpData);
|
||||
if (flip)
|
||||
{
|
||||
bitmap.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
|
Loading…
Reference in New Issue
Block a user