Keyword

Saving image in image tab goes to error...

More
11 years 5 months ago - 11 years 5 months ago #112725 by Luka
Hi. When I'm trying to save an image in image tab i'm getting blank screen. After I set my error reporting to Maximum and repeat this, I'm getting ana error:

Fatal error: Allowed memory size of 5242880 bytes exhausted (tried to allocate 3600 bytes) in /home/zrenjonl/public_html/administrator/components/com_k2/lib/class.upload.php on line 3295

I'm using Joomla 2.5.11 and K2 2.6.6

That part of code is: (I made that line (3295) red and underlined)

/**
* Creates a container image
*
* @access private
* @param integer $x Width
* @param integer $y Height
* @param boolean $fill Optional flag to draw the background color or not
* @param boolean $trsp Optional flag to set the background to be transparent
* @return resource Container image
*/
function imagecreatenew($x, $y, $fill = true, $trsp = false) {
if ($x < 1) $x = 1; if ($y < 1) $y = 1;
if ($this->gdversion() >= 2 && !$this->image_is_palette) {
// create a true color image
$dst_im = imagecreatetruecolor($x, $y);
// this preserves transparency in PNGs, in true color
if (empty($this->image_background_color) || $trsp) {
imagealphablending($dst_im, false );
imagefilledrectangle($dst_im, 0, 0, $x, $y, imagecolorallocatealpha($dst_im, 0, 0, 0, 127));
}
} else {
// creates a palette image
$dst_im = imagecreate($x, $y);
// preserves transparency for palette images, if the original image has transparency
if (($fill && $this->image_is_transparent && empty($this->image_background_color)) || $trsp) {
imagefilledrectangle($dst_im, 0, 0, $x, $y, $this->image_transparent_color);
imagecolortransparent($dst_im, $this->image_transparent_color);
}
}
// fills with background color if any is set
if ($fill && !empty($this->image_background_color) && !$trsp) {
list($red, $green, $blue) = $this->getcolors($this->image_background_color);
$background_color = imagecolorallocate($dst_im, $red, $green, $blue);
imagefilledrectangle($dst_im, 0, 0, $x, $y, $background_color);
}
return $dst_im;
}

Please help

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 5 months ago #112726 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Saving image in image tab goes to error...
Hello Luka,

You should increase your PHP memory limit. you can either edit your php.ini file or contact your hosting provider.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum