图像处理时 每次都调用Bitmap的SetPixel GetPixel快
还是LockBits后 得到图像指针再处理快?
我看LockBits的介绍是说
locks a rectangular portion of this bitmap and provides a temporary buffer that you can use to read or write pixel data in a specified format. Any pixel data that you write to the buffer is copied to the Bitmap object when you call Bitmap::UnlockBits.
锁住一个矩形区域 提供一个临时buffer 你可以对其读取或写入指定格式的数据 调用Unlock后 写到或读取buffer的数据会copy到Bitmap对象
总感觉这个copy操作会浪费时间
还是LockBits后 得到图像指针再处理快?
我看LockBits的介绍是说
locks a rectangular portion of this bitmap and provides a temporary buffer that you can use to read or write pixel data in a specified format. Any pixel data that you write to the buffer is copied to the Bitmap object when you call Bitmap::UnlockBits.
锁住一个矩形区域 提供一个临时buffer 你可以对其读取或写入指定格式的数据 调用Unlock后 写到或读取buffer的数据会copy到Bitmap对象
总感觉这个copy操作会浪费时间

