红色的成分占多大比例!!
绿色的成分占多大比例!!
蓝色的成分占多大比例!!
干这个用??
晕了啊
你干什么啊
这样的程序有什么用啊
效率太底了
GetPixel是可以满足你的要求
同样的还可以SetPixel改变颜色
不过好象这样用没什么意义了

解决方案 »

  1.   

    CDC::GetPixel  
    COLORREF GetPixel( int x, int y ) const;COLORREF GetPixel( POINT point ) const;Return ValueFor either version of the function, an RGB color value for the color of the given point. It is –1 if the coordinates do not specify a point in the clipping region.
    GetRValue 
    This macro retrieves an intensity value for the red component of a 32-bit red, green, blue (RGB) value. BYTE GetRValue( 
    DWORD rgb );
    GetGValue 
    This macro retrieves an intensity value for the green component of a 32-bit red, green, blue (RGB) value. BYTE GetGValue( 
    DWORD rgb );
    GetBValue 
    This macro retrieves an intensity value for the blue component of a 32-bit red, green, blue (RGB) value. BYTE GetBValue( 
    DWORD rgb );
    用这几个函数就可以吧
      

  2.   

    我只知道BMP格式的方法:
    先用LoadImage()得到这幅图片,再从像素位的指针处开始读内存中的值,但一定要注意BMP影像格式的要求,即一条线Size等于4的倍数。其他具体的做法可以参考<<Windows 程序设计>>第十五章--与设备无关的位图。
    其他格式的图片我也不会。