fixed transformations to get image pixel coordinates