protected virtual void CopySourceImageCore() { ManipulatedImage.Size = SourceImage.Size; int[] sourcePixels, manipulatedPixels; using (SourceImage.LockPixels(out sourcePixels)) using (ManipulatedImage.LockPixels(out manipulatedPixels)) { sourcePixels.CopyTo(manipulatedPixels, 0); } }
public void SetNewImage(CodedImage newImage) { ManipulatedImage.Size = newImage.Size; int[] sourcePixels, manipulatedPixels; using (newImage.LockPixels(out sourcePixels)) using (ManipulatedImage.LockPixels(out manipulatedPixels)) { sourcePixels.CopyTo(manipulatedPixels, 0); } ManipulatedImage.SourceImageFileName = newImage.SourceImageFileName; OnImageChanged(); }