How can I painlessly rotate a tiff image by some small angle around a point with specific coordinates? The image shouldn't be altered otherwise, it can be padded with zeros if necessary, and then saved back into tiff format. It should also output the coordinates of the center of rotation on a new image.

I see ImageRotate function but it doesn't allow to specify the point of rotation.

Thank you.

  • 1
    $\begingroup$ Please show an example input and two example outputs for two different centers of rotation. I can't see how a "center of rotation" makes any difference when you need to pad the image anyway. $\endgroup$
    – Szabolcs
    Commented Mar 1, 2018 at 17:38
  • $\begingroup$ Easiest way is probably to combine ImageTransformation and RotationTransform (where you can specify a center). $\endgroup$ Commented Mar 1, 2018 at 17:39

1 Answer 1


you might want to work with ImageTransformation

ImageTransformation[ img ,
 RotationTransform[ .2 , {.75, .5} ] , 
 PlotRange -> {{-1/2, 3/2}, {-1/2, 3/2}}, Background -> White, 
 Masking -> All]

enter image description here

animation of rotation about a point near the edge..

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.