Commented out image orientation code due to lack of support for imagerotate() function in some Linux distros