摘要: /// <summary> /// 将源图像灰度化,但是没有转化为8位灰度图像。 /// http://www.bobpowell.net/grayscale.htm /// </summary> /// <param name="original"> 源图像。 </param> /// <returns> 灰度RGB图像。 </returns> public static Bitmap MakeGrayScale(Bitmap original) { //create a... 阅读全文
posted @ 2013-05-21 15:33 louiskoo 阅读(3637) 评论(0) 推荐(0) 编辑
摘要: #region 图片旋转函数 /// <summary> /// 以逆时针为方向对图像进行旋转 /// </summary> /// <param name="b">位图流</param> /// <param name="angle">旋转角度[0,360](前台给的)</param> /// <returns></returns> public static Bitmap Rotate(Bitmap b, int angle) { angle = angl 阅读全文
posted @ 2013-05-21 15:32 louiskoo 阅读(20577) 评论(2) 推荐(1) 编辑
摘要: 第一种方法: public static byte[] GetImagePixel(Bitmap img) { byte[] result = new byte[img.Width*img.Height*3]; int n = 0; for (int i = 0; i < img.Height; i++) { for (int j = 0; j < img.Width; j++) { result[... 阅读全文
posted @ 2013-05-21 15:31 louiskoo 阅读(14340) 评论(0) 推荐(0) 编辑