scaling down image size and remapping