SFML community forums

Help => Graphics => Topic started by: jerryd on July 04, 2017, 04:01:45 am

Title: Pixel Color
Post by: jerryd on July 04, 2017, 04:01:45 am
SFML forum,

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

jerryd
Title: Re: Pixel Color
Post by: Gleade 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.
Title: Re: Pixel Color
Post by: Martin Sand 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?
Title: Re: Pixel Color
Post by: Flaze07 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