There is an issue regarding the sampling with this approach. Since the code simply samples the closest value the result is heavily undersampled in some regions (r>>), while it is oversampled in others (r<<).
It would be interesting to have a correct approach that satisfies signal processing criteria (e.g. smooth oversampled regions and grey values where undersampled black and white values come together.
- The progress bar should be removed when the program finishes - even when interrupted (might be a hard one)
- A cancel button to interrupt the program might be handy right there
- the bar should integrate into the interface a bit better (docking - or in status bar of editor)
Otherwise - nice work!