各位朋友:
我在对图片进行处理时又三种方法:像素、内存、指针。
功能实现在本地很好,都没有问题。但是系统发布后放在服务器上运行总是报错,提示错误是此行代码
public bool ColorChange(Bitmap b, int red, int green, int blue, Color cl)
{
BitmapData bmData = b.LockBits(new Rectangle(0, 0, b.Width, b.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);*****************************}一直说参数无效,搞了半天也没搞定,不知是何原因,在服务器上面只能进行像素操作。
希望哪位大虾能够帮忙解决问题。
我在对图片进行处理时又三种方法:像素、内存、指针。
功能实现在本地很好,都没有问题。但是系统发布后放在服务器上运行总是报错,提示错误是此行代码
public bool ColorChange(Bitmap b, int red, int green, int blue, Color cl)
{
BitmapData bmData = b.LockBits(new Rectangle(0, 0, b.Width, b.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);*****************************}一直说参数无效,搞了半天也没搞定,不知是何原因,在服务器上面只能进行像素操作。
希望哪位大虾能够帮忙解决问题。
Bitmap b = new Bitmap(fileName);
img = b.Clone(new Rectangle(0, 0, b.Width, b.Height),PixelFormat.DontCare);自己在论坛找到了(但是我装了VS2010 里面是不存在次问题的,我使用新的机器在vs2005 里才发现次问题,或许是FramWork 4 中已经解决了此问题。