added image smoothing support. Fixes #6