System.Drawing.Bitmap
現在、 a を WPFに統合する際に問題が発生していWriteableBitmap
ます。
Bitmap
のto 位置 (X,Y)からコピーしたいWriteableBitmap
。
次のコードは、私がこれをどのように試みたかを示しています。
BitmapData Data = Bitmap.LockBits(new Rectangle(0, 0, Bitmap.Width, Bitmap.Height), ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
WriteableBitmap.Lock();
//CopyMemory(WriteableBitmap.BackBuffer, Data.Scan0, ImageBufferSize);
Int32Rect Rect = new Int32Rect(X, Y, Bitmap.Width, Bitmap.Height);
WriteableBitmap.AddDirtyRect(Rect);
Bitmap.UnlockBits(Data);
Bitmap.Dispose();`
どうもありがとう、
ネオクリプト