谢谢。

解决方案 »

  1.   

    http://www.vckbase.com/code/listcode.asp?mclsid=7&sclsid=703
      

  2.   

    对, lanstar200(if(TRUE){马上给我分})  说的算是思路,楼主要多动手了主要看一看bmp文件的格式,你还要会去读取bmp文件和写bmp文件,否则,你理解了也写不出来的
      

  3.   

    用调色板怎样,那个vcbase上的用dll,要的就是你的在dll的远代码,真没劲。
      

  4.   

    看看这个可以吗?  BITMAPINFOHEADER bih;
         
            bih.biBitCount=16;        bih.biClrImportant=0;        bih.biClrUsed=0;        bih.biCompression=0;        bih.biHeight=btm.bmHeight;        bih.biPlanes=1;        bih.biSize=sizeof(BITMAPINFOHEADER);        bih.biSizeImage=size;        bih.biWidth=btm.bmWidth;        bih.biXPelsPerMeter=0;        bih.biYPelsPerMeter=0;
    改了写可是还有问题。
      

  5.   

    其实这个说起来,做起来难,4个字节转了后,可是占用的还是32位的空间(文件),那么转换的意义就失去了,望高手发表一下意见。
    to;yang 104,你的方法你实践过了吗,有没有代码那出来探讨一下了
      

  6.   

    If you want to be an expert in GDI programming, read my book.For your problem, there are two steps: find a good quality color table and then dither the true color image to 8-bpp image. For the first part, octree color quantization is a good algorithm. For the second part, you can use error diffusion. Of course, you can just use GDI directly with an halftone palette, but quality is not the best.Check source code from my book (http://safariexamples.informit.com/0130869856/).Here is some related screen captures http://www.fengyuan.com/sample/samplech13.html.www.fengyuan.com