There are several issues concerning the way MComix draws images (most important first):
- Currently, a (scaled) version of the entire image (depending on the zoom factor) is stored in main memory. This has at least two disadvantages: First, it needs large amounts of RAM, especially if you zoom in. (I already ran into problems because of that.) Second, it takes a long time until you can see the image for the first time. It would be better to draw only the visible part of the image on the fly, without any additional memory used for offscreen buffering. That is, the viewport of the main window should work just the same way the magnifying lens already does. (If you use the lens, it does not buffer the scaled version of the entire image but scales up on the fly, which is way faster.)
- When I open a quite large image (around 2300×7600) using "Best fit" mode at the smallest zoom factor possible, it needs around 15 seconds to render the image on the screen, even though it takes up only 10×30 pixels due to the small zoom factor. Re-rendering occurs every time I attempt to zoom out, even if the zoom factor does not change anymore. (Scaling mode is set to "Normal (fast)".)
- "Enhance image" currently applies sharpening to the scaled version of the image, not the original image. Thus, if you zoom to 50%, the kernel used for sharpening appears to be twice as big in every dimension. On the other hand, if you zoom to 800%, sharpening is almost useless since the actual kernel becomes quite small (relative to the original image). Side effect: The more you zoom in, the more time sharpening will consume because of that.
draw_image there is a piece of code with a comment that says "Don't stack up redraws." Not sure but it looks like it needs a mutex to emulate an atomic CAS operation on