DataObjects/Images.php
[Pman.Core] / DataObjects / Images.php
index ff5d7f9..4635f49 100644 (file)
@@ -839,7 +839,6 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
             $width = $this->width;
             $height = $this->height;
             
-            print_R($width);exit;
             if(!empty($scaleWidth)){
                 $width = $scaleWidth;
 
@@ -847,6 +846,8 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
                     $height = $this->height * $scaleWidth / $this->width;
                 }
             }
+            
+            
 
             if(!empty($scaleHeight)){
                 $height = $scaleHeight;
@@ -858,7 +859,7 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
             
             $im = imagecreatefromstring($data);
             
-            if (($scaled = imagescale($im, $width, $width)) != false) {
+            if (($scaled = imagescale($im, $width, $height)) != false) {
                 ob_start();
                 imagejpeg($scaled);
                 $data = ob_get_contents();