Rotate image without losing information
gist.github.com
gist.github.com
Actually, lossless rotation is only possible for 90/180/270 degrees, otherwise some information loss is unavoidable.
I can't believe you don't know this -- rotating bitmap images at angles other than multiples of 90 degrees always loses information.