摘要:
public static unsafe byte[] ConvertTo8Byte(Bitmap img) { byte[] result = new byte[img.Width * img.Height]; int n = 0; BitmapData data = img.LockBits(new Rectangle(0, 0, img.Width, img.Height), ImageLockMode.ReadOnly, ... 阅读全文
摘要:
Bitmap bit = new Bitmap(renderImage.Width, renderImage.Height); using (Graphics g = Graphics.FromImage(bit)) { g.DrawImage(pictureBox1.Image, new Rectangle(0, 0, renderImage.Width, renderImage.Height), new Rectangle(0, 0, renderImage.Width, renderImage.Height), ... 阅读全文