Repaint viewport when the image becomes unavailable due to external factors.
Started removing some const reference return values.
Repaired low-resolution rendering.
Hopefully slightly reduced some UI latency when window resize is enabled.