- foreach ($infos as $i){
-
- if(!preg_match('/^Pages:[\s]?([0-9]+)/', $i, $matches)){
- continue;
- }
- print_R($matches);exit;
- $ret = (empty($matches[1])) ? false : $matches[1];
- break;
- }
-
- break;
- default :
- break;
+ switch($orientation) {
+ case Imagick::ORIENTATION_BOTTOMRIGHT:
+ $imagick->rotateimage(new ImagickPixel('#00000000'), 180); // rotate 180 degrees
+ break;
+
+ case Imagick::ORIENTATION_RIGHTTOP:
+ $imagick->rotateimage(new ImagickPixel('#00000000'), 90); // rotate 90 degrees CW
+ break;
+
+ case Imagick::ORIENTATION_LEFTBOTTOM:
+ $imagick->rotateimage(new ImagickPixel('#00000000'), -90); // rotate 90 degrees CCW
+ break;