Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Pixel Color  (Read 2660 times)

0 Members and 1 Guest are viewing this topic.

jerryd

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Pixel Color
« on: July 04, 2017, 04:01:45 am »
SFML forum,

 How can I read the color of a specific pixel on the screen?

jerryd

Gleade

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Pixel Color
« Reply #1 on: July 04, 2017, 04:18:40 am »
SFML forum,

 How can I read the color of a specific pixel on the screen?

jerryd

Your best bet to my knowledge would be to use a Window.capture() which returns an image, then you can use getPixel(x, y). It'll be a very expensive operation.
« Last Edit: July 04, 2017, 04:21:06 am by Gleade »

Martin Sand

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Email
Re: Pixel Color
« Reply #2 on: July 04, 2017, 11:16:15 pm »
How can I read the color of a specific pixel on the screen?

What exactly do you want to achieve?

Flaze07

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • Email
Re: Pixel Color
« Reply #3 on: July 09, 2017, 04:25:28 am »
How can I read the color of a specific pixel on the screen?

What exactly do you want to achieve?

really...he said it clearly
anyways this has been answered by Gleade
so...sfml is not a raster graphic graphic library
as Gleade said the operation will be expensive
if you want to do it continuously
it is a bad idea  :P

 

anything