DataObjects/Images.php
authorEdward <edward@roojs.com>
Fri, 12 Oct 2018 02:51:31 +0000 (10:51 +0800)
committerEdward <edward@roojs.com>
Fri, 12 Oct 2018 02:51:31 +0000 (10:51 +0800)
DataObjects/Images.php

index 4635f49..03d9713 100644 (file)
@@ -830,10 +830,6 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
         
         $data = file_get_contents($file);
         
-        if($rotate){
-            $data = $this->rotate();
-        }
-        
         if(!empty($scaleWidth) || !empty($scaleHeight)){
             
             $width = $this->width;
@@ -870,6 +866,10 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
             
         }
         
+        if($rotate){
+            $data = $this->rotate();
+        }
+        
         $base64 = 'data:' . $this->mimetype . ';base64,' . base64_encode($data);
         
         return $base64;