If this is for an embedded device rotating images is an expensive operation to do and uses a lot of CPU to do it.