Half of all images uploaded by mobile devices are displayed wrong in xenForo as it does not handle image orientation. This is true for all kind of photos taken from a mobile device. This would just correct the upload for thumbnails and not for the full image for ImageMagick:
"Quick and dirty" file modification: http://xenforo.com/community/resources/auto-image-rotate-for-iphone-and-ipad.1755/
PHP:
class AutoRotate_Image_Imagemagick_Pecl extends XFCP_AutoRotate_Image_Imagemagick_Pecl
{
protected function _setImage(Imagick $image)
{
$orientation = $image->getImageOrientation();
switch($orientation) {
case Imagick::ORIENTATION_BOTTOMRIGHT:
$image->rotateimage(new ImagickPixel(), 180); // rotate 180 degrees
break;
case Imagick::ORIENTATION_RIGHTTOP:
$image->rotateimage(new ImagickPixel(), 90); // rotate 90 degrees CW
break;
case Imagick::ORIENTATION_LEFTBOTTOM:
$image->rotateimage(new ImagickPixel(), -90); // rotate 90 degrees CCW
break;
}
$image->setImageOrientation(Imagick::ORIENTATION_TOPLEFT);
return parent::_setImage($image);
}
}
"Quick and dirty" file modification: http://xenforo.com/community/resources/auto-image-rotate-for-iphone-and-ipad.1755/