$data = file_get_contents($file);
+ if($rotate){
+ $data = $this->rotate();
+ }
+
if(!empty($scaleWidth) || !empty($scaleHeight)){
$width = $this->width;
}
- if($rotate){
- $data = $this->rotate();
- }
-
$base64 = 'data:' . $this->mimetype . ';base64,' . base64_encode($data);
return $base64;
}
$orientation = $imagick->getImageOrientation();
-
+ print_R($orientation);exit;
switch($orientation) {
case Imagick::ORIENTATION_BOTTOMRIGHT:
$imagick->rotateimage(new ImagickPixel('#00000000'), 180); // rotate 180 degrees