Is there a way to save a screenshot in a HBITMAP, (either partial or full) and use it in template matching? If so, what would be the best way to approach doing so. I think imdecode() would work but I could not decipher how to go about using it.
The point of this exercise is to avoid saving the file to disk. I was able to do this already and my program ran but there will be a large number of screenshots taken and I would prefer to not have the hard drive working constantly.
If there is a better way than HBITMAP to enter images from screen into a template match function I would love to learn about it.
Note: I am working in c++ with visual studio 2013. The matching is working great currently but I have not found a dependable way to get screen images.