Currently working with PHP and iMagick to develop a poster printing Web application.
This is the example image I am using to test upload/image editing features of th
This code in orrd's excellent answer requires iMagick version 6.3+.:
$image->setImageOrientation(imagick::ORIENTATION_TOPLEFT);
Works perfectly and takes care of os/device orientation differences. Would not work with 6.2.
I had coded to get device. Here in case someone needs it.
$ua = $_SERVER['HTTP_USER_AGENT'];
$strcut = stristr($ua, '(')."
";
$textlen = strpos($strcut,";");
$deviceos = substr($strcut,1,($textlen-1));
echo "Device O/S: * $deviceos"."
";