reorder_img was modifying the input image affine

fixes #325