1

I am coding a raytracer engine in C using X11 on a Linux. I would like to add a screenshot feature but I can't use any other lib than the standard X11.

Is there a "simple" way to do that, or do I have to create a bmp file myself from the pixels I have?

Roger
  • 657
  • 5
  • 18

1 Answers1

1

You will manually have to get color values of all the pixels and then convert it to a format of your choice. AFAIK, there is no "simple" way to do it.

You can check with this question here: How do take a screenshot correctly with xlib?

Community
  • 1
  • 1
Nenthil
  • 53
  • 3