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?
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?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.