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;