I am creating a cad viewer that deals with very large image files and I am trying to optimize it for as high frame rate and low memory level as possible.
It uses GDI + for panel rendering.
This drawback is image rendering. In some files I use reference images that are especially large (8000x8000 pixels). I optimized memory usage by only loading them when they become visible, and getting rid of them when they don't. This reduces the likelihood that the program will run out of memory, but does not allow you to load and unload images too often; however, rendering the images themselves (context.DrawImage) still carries a very large overhead.
Now Iām learning how to mix images in a smaller buffer, rendering this (usually much smaller) buffer, and then updating / restoring it with a significant change in the zoom level.
The problem is that I cannot find any provisions for this in GDI. Can anyone suggest how I could achieve this?
c # winforms gdi + graphics drawing
Toby wilson
source share