Made auto rotation for the bitmap