gd-png error: compression level must be 0 through 9
The above error is displaying when the following function is called
function resizeImage($image,$width,$height,$scale)
{
$newImageWidth = ceil($width $scale);
$newImageHeight = ceil($height $scale);
$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);
$source = imagecreatefrompng($image);
imagecopyresampled($newImage,$source,0,0,0,0,$newImageWidth,$newImageHeight,$width,$height);
imagepng($newImage,$image,90);
chmod($image, 0777);
return $image;
}
after creating the new re-sized image the image is becoming blank(0bytes).. Problem is occurring after the imagecopyresampled function is called.. please help what is ther error with the above code///