I am working on making a loupe tool using C#. Much like this one: http://colorsnapper.com I have searched all over Google for a way to zoom in on a predefined area of the screen, enough to view each individual pixel.
To be more specific, I want my mouse to become a magnifying glass on the screen that enhances each pixel the mouse hovers over. I need to figure out how to magnify that predefined area.
Does anyone know of a way I can do this, or any APIs that are available.
UPDATE I have found a Magnification API that Microsoft has provided: http://msdn.microsoft.com/en-us/library/windows/desktop/ms692402(v=vs.85).aspx However, this API is in C++. As I have gathered, C++ is what the Windows OS is written in, and to use this API I will need to use some sort of C# wrapper. This isn't a question, I just thought I would add to this post for other users.
You could capture the screen to a bitmap in memory:
And then take a portion of the image perhaps a 50px by 50px rectangle centered at the mouse position:
And display it in a 100px by 100px rectangle centered at the mouse position. That would give you a 2X zoom level. The larger the ratio of (displayed size)/(captured size) the more you zoom. Something along the lines of: