DataObjects/Images.php
[Pman.Core] / DataObjects / Images.php
index d5728f3..5884eab 100644 (file)
@@ -833,6 +833,25 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
         if($rotate){
             $data = $this->rotate();
         }
+            
+        $width = $this->width;
+        $height = $this->height;
+
+        if(!empty($scaleWidth)){
+            $width = $scaleWidth;
+
+            if(empty($scaleHeight)){
+                $height = $this->height * $scaleWidth / $this->width;
+            }
+        }
+        
+        if(!empty($scaleHeight)){
+            $height = $scaleHeight;
+
+            if(empty($scaleWidth)){
+                $width = $this->width * $scaleHeight / $this->height;
+            }
+        }