Results 1 to 9 of 9

Thread: getting the color from the screen?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    getting the color from the screen?

    I'm trying to get the color of a specified pixel on the screen. I tried getting a screenshot and then getting the color from that (which didnt work for whatever reason), but it's too slow and inefficient. Is there a way to do this, perhaps with the GetPixel API?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    bump
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  3. #3
    Hyperactive Member phrozeman's Avatar
    Join Date
    Apr 2000
    Location
    Netherlands
    Posts
    442
    U mean like the Color Picker in Photoshop, get the color of the pixel u clicked on in an image?
    There's a certain mystique when I speak, that you notice that it's sorta unique, cause you know it's me

  4. #4

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by phrozeman
    U mean like the Color Picker in Photoshop, get the color of the pixel u clicked on in an image?
    not the pixel on an image, on the screen. Kinda like the color picker in fireworks. You click somewhere on the screen (yeah screen, on any program) and it gives you the color for that pixel
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  5. #5
    Hyperactive Member phrozeman's Avatar
    Join Date
    Apr 2000
    Location
    Netherlands
    Posts
    442
    Yeah, i know what u mean...
    I never saw an example of that before, but i gonna take a look if i can find something
    There's a certain mystique when I speak, that you notice that it's sorta unique, cause you know it's me

  6. #6

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by phrozeman
    Yeah, i know what u mean...
    I never saw an example of that before, but i gonna take a look if i can find something
    did you find anything?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  7. #7
    New Member
    Join Date
    Feb 2004
    Location
    Vladikavkaz, Russia
    Posts
    7
    http://www.vandog.com/colorpicker.html

    ...It is tested with VB, but I have no idea does it works properly with VB.NET.

    ( ? )
    http://www.vandog.com/

  8. #8

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  9. #9
    Member
    Join Date
    Mar 2004
    Posts
    39
    If you are able to create a Device context (the CreateDC API) of the screen, there is a API called GetPixel in Windows 2000 and later to get the RGB settings for the appropriate pixel in the Device context.

    This is more or less a shot in the dark as I seldom do much API programming. But my knowledge in C++ programming tells me that this should be possible.

    /Nisse

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