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;
|
return null;
|
||||||
}
|
}
|
||||||
var handle = GCHandle.Alloc(buff, GCHandleType.Pinned);
|
var bitmap = new Bitmap(m_Width, m_Height, PixelFormat.Format32bppArgb);
|
||||||
var scan0 = handle.AddrOfPinnedObject();
|
var bmpData = bitmap.LockBits(new Rectangle(0, 0, m_Width, m_Height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
|
||||||
var bitmap = new Bitmap(m_Width, m_Height, m_Width * 4, PixelFormat.Format32bppArgb, scan0);
|
Marshal.Copy(buff, 0, bmpData.Scan0, buff.Length);
|
||||||
handle.Free();
|
bitmap.UnlockBits(bmpData);
|
||||||
if (flip)
|
if (flip)
|
||||||
{
|
{
|
||||||
bitmap.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
bitmap.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||||
|
Loading…
Reference in New Issue
Block a user