// workaround is to create a new truecolor image, allocate a transparent color, and copy the
// image over to it using imagecopyresampled.
$newImage = imagecreatetruecolor($width, $height);
$transparentColor = imagecolorallocatealpha($newImage, 0, 0, 0, 127);
imagecolortransparent($newImage, $transparentColor);
imagefill($newImage, 0, 0, $transparentColor);
imagecopyresampled(
$newImage,
$this->image,
0, 0, 0, 0,
$width,
OutOfMemoryError
|
---|
Symfony\Component\ErrorHandler\Error\OutOfMemoryError: Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35800257 bytes) at /home/kandima/public_html/administrator/components/com_widgetkit/vendor/abeautifulsite/simpleimage/src/claviska/SimpleImage.php:808 |