DataObjects/Images.php
authorEdward <edward@roojs.com>
Thu, 4 Oct 2018 03:01:38 +0000 (11:01 +0800)
committerEdward <edward@roojs.com>
Thu, 4 Oct 2018 03:01:38 +0000 (11:01 +0800)
DataObjects/Images.php

index 4edf348..5884eab 100644 (file)
@@ -843,9 +843,18 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
             if(empty($scaleHeight)){
                 $height = $this->height * $scaleWidth / $this->width;
             }
             if(empty($scaleHeight)){
                 $height = $this->height * $scaleWidth / $this->width;
             }
+        }
+        
+        if(!empty($scaleHeight)){
+            $height = $scaleHeight;
 
 
+            if(empty($scaleWidth)){
+                $width = $this->width * $scaleHeight / $this->height;
+            }
         }
         
         }
         
+        
+        
         $base64 = 'data:' . $this->mimetype . ';base64,' . base64_encode($data);
         
         return $base64;
         $base64 = 'data:' . $this->mimetype . ';base64,' . base64_encode($data);
         
         return $base64;