Aku tengah buat image processing program ada masalah masa clone image. Image yang dah asal yang dah diclone dan diproses turut menjejaskan image asal. Jadi aku cari jumpa code ni :
public static Image cloneImage(Image srcImage){
if (srcImage == null) return null;
Bitmap copy = new Bitmap(srcImage);
using (Graphics g = Graphics.FromImage(copy))
{
g.DrawImage(srcImage,new Rectangle(0, 0, srcImage.Width, srcImage.Height));
}
return copy;
}
Malaya Merdeka - from Ash's vinyl collection
9 months ago