}
- if($rotate){
- $data = $this->rotate();
- }
+// if($rotate){
+// $data = $this->rotate($data);
+// }
$base64 = 'data:' . $this->mimetype . ';base64,' . base64_encode($data);
return $page;
}
- function rotate()
+ function rotate($imageBlob = false)
{
- $imagick = new Imagick($this->getStoreName());
+ if(empty($imageBlob)){
+ $imagick = new Imagick($this->getStoreName());
+ } else {
+ $imagick = new Imagick();
+ $imagick->readImageBlob($imageBlob);
+ }
$orientation = $imagick->getImageOrientation();