Handle case when bitmap used to shrink image has bad size