$width = $this->width;
$height = $this->height;
- print_R($width);exit;
if(!empty($scaleWidth)){
$width = $scaleWidth;
$height = $this->height * $scaleWidth / $this->width;
}
}
+
+
if(!empty($scaleHeight)){
$height = $scaleHeight;
$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();