set img.width/height to imageData bounds