Added downscaling.

This is done using area-averaging, and I feel pretty proud of finding
out this algorithm without consulting web-sites for existing algorithms
:)