解决方案 »

  1.   

    byte*  
    BitmapData
    用指针操作
      

  2.   

    这东西明显要先LockBits,然后用指针 填充数据。 注意Bitmap扫描行的大小必须是4的倍数。你代码里r[i + j * width] * 255  这里还乘以个255和解啊,那个肯定结果不对了啊。 
      

  3.   

    给你完整的代码,绝对实现你的目的。另,本人很需要分        BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, imageWidth, imageHeight), ImageLockMode.ReadWrite, pixelFormat);        try
            {
                int stride = bitmapData.Stride;
                IntPtr buf = bitmapData.Scan0;            ds.ReadRaster(xOff, yOff, width, height, buf, imageWidth, imageHeight, dataType,
                    channelCount, bandMap, pixelSpace, stride, 1);
            }
            finally
            {
                bitmap.UnlockBits(bitmapData);
            }        bitmap.Save(filename);
      

  4.   

    1,你的图像Format是什么样的?24位、32位是不一样的;
    2,指针是最快的,你为什么不想使用?
    3,你最简单的C#图像处理操作都没有弄明白,比如,填充图像数据之前,一定要先Lock一块内存之类的操作等,建议你随便找个相关的例子看下。
    这里给你个例子http://dongtingyueh.blog.163.com/blog/#m=0&t=1&c=fks_084065083084089066081081087095080080080074080083085