TODO: refactor (required) (view WIP branch) try to recycle image snapshot and replace just delta-change rectangle (optional) try to implement tiling for image snapshot to save even more memory (optional)