needed to construct transformation matrix for PIL to use