}
}
- print_R($width);exit;
+
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();