Translate to image anchor point, scale, rotate, translate back
Translate to image center before scale and rotation

Same treatment here as with the canvas replay.