/// <summary> /// Creates an exact copy of this <see cref='Image'/>. /// </summary> public object Clone() { IntPtr cloneImage = IntPtr.Zero; Gdip.CheckStatus(Gdip.GdipCloneImage(new HandleRef(this, nativeImage), out cloneImage)); ValidateImage(cloneImage); return(CreateImageObject(cloneImage)); }
public object Clone() { IntPtr newimage = IntPtr.Zero; int status = Gdip.GdipCloneImage(nativeImage, out newimage); Gdip.CheckStatus(status); if (this is Bitmap) return new Bitmap(newimage); else return new Metafile(newimage); }
public object Clone() { IntPtr newimage; int status = Gdip.GdipCloneImage(nativeImage, out newimage); Gdip.CheckStatus(status); if (this is Bitmap) { return(new Bitmap(newimage)); } else { return(new Metafile(newimage)); } }