I am interested to mimic Windows Magnifier
My objective is to mimic Windows Magnifier (Accessories|Accessibility|Magnifier.exe).
To make simpler case, instead of magnifying the desktop window, I implement my magnifier for my Image Viewer. I create a custom control named loupe control.
It is a movable loupe control on which the magnified portion will be displayed.
The core of my code lies in Paint event handler of the loupe control as follows
e.Graphics.DrawImage(image, dstRect, srcRect, GraphicsUnit.Pixel);
image: image displayed on the client of Image Viewer main window.
dstRect: rectangle represents ClientRect of the loupe control.
srctRect: rectangle represents portion of image tobe magnified.
The bigger image size the slower rendering will be while moving the loupe.
How to speed up the rendering process while moving the loupe?
I have tried to crop the image before sending it to the loupe control. In this case the loupe will render smaller image. Croping process,however, results in more overhead.