Today I have been scratching my head with rotating image on arbitrary angle. Something which looked easy from first look isn’t that easy at all. Here’s good explanation about how artifacts appear during rotation and how to avoid them Rotating Images. Nice wiki article gives introduction to rotation matrix Rotation matrix. This oldfashioned site Leptonica has nice section Rotation which explains Rotation by Area Mapping.