resize a .bmp file by a factor of n