Get RGB values with second way

This is a discussion on Get RGB values with second way within the Windows Programming forums, part of the Platform Specific Boards category; Hi Its very important, is possible to get RGB values or Pixels or Grey values from a pic without load ...

  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    43

    Get RGB values with second way

    Hi
    Its very important, is possible to get RGB values or Pixels or Grey values from a pic without load it in Picture or Image box and use:
    Image1->Canvas->Pixels[x][y] method?? Is any other way from the above??
    Lets say choose the file and open it with a way and get the values??
    Is possible that?? Any ideas or code??
    Thanks

  2. #2
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    Loading the image and displaying it onto an HDC it the only way I know.

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,586
    Load the image into a buffer. Given it's in RAW RGB form it's quite simple to get the values. If not you will have to decompress it to get the RGB values.

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    You can use GetDIBits to retrieve the bitmap data and evaluate it as described by Bubba.

    There's an example by anonytmouse in this thread that may be of some interest. A further board search on this subject should provide more information/examples.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL: Pixel addition
    By Hunter2 in forum Game Programming
    Replies: 4
    Last Post: 12-15-2008, 01:36 PM
  2. Replies: 1
    Last Post: 12-30-2007, 09:08 AM
  3. How to read out the RGB values of an image?
    By pjeremy in forum C Programming
    Replies: 5
    Last Post: 05-28-2006, 08:49 AM
  4. get RGB values
    By lmo863 in forum C++ Programming
    Replies: 7
    Last Post: 03-12-2005, 04:50 AM
  5. Stopwatch program (need help!)
    By modnar in forum C Programming
    Replies: 9
    Last Post: 03-21-2004, 11:42 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21