CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2002
    Location
    INDIA
    Posts
    135

    IS IT POSSIBLE TO COMPARE THE COLOR OF A MONO BMP?????

    HI,

    I HAVE A MONO BITMAP COLORED WITH BLACK BRUSH.IS IT POSSIBLE TO COMPARE THE COLOR OF THAT BITMAP?
    IF POSSIBLE PLEASE HELP ME WITH THE CODE.

    ADVANCED THAX
    -SRUJAN


  2. #2
    Join Date
    Mar 2000
    Location
    Bangalore,India
    Posts
    776

    Re: IS IT POSSIBLE TO COMPARE THE COLOR OF A MONO BMP?????

    Hi srujan

    this is one way u can do for comparison:
    1.Create a memory DC from the opened bitmap.
    2.use CDC:GetPixel() function which returns u a COLORREF.
    3.then may be u can use GetBValue(),GetGValue(),
    GetRValue() macros to compare the pixel values with ur desired color.

    Hope this helps
    SKP


    Be sure to rate answers if it helped, to encourage them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured