Page 1 of 1

Error while rotating image

Posted: 03 Sep 2020, 16:00
by Adarre
Hello,

Joomla 3.9.21.
PhocaGallery 4.3.18
PHP 7.3.21

In the Phoca Gallery Control Panel, I have an error when I want to rotate an image :

Error while rotating image
ErrorNoImageCreateTruecolor


On the same server I have other websites where it works fine.

Any explanation ?

Re: Error while rotating image

Posted: 08 Sep 2020, 12:21
by Jan
Hi, try to open this file:

administrator\components\com_phocagallery\libraries\phocagallery\image\imagerotate.php

and on line cca 212 delete the symbol "@"

FROM:

Code: Select all

$image3 = @ImageCreateTruecolor($dst[2], $dst[3]);
TO:

Code: Select all

$image3 = ImageCreateTruecolor($dst[2], $dst[3]);
Maybe you will get more detailed information about the error from your system. :idea:
(of course PHP error reporting needs to be enabled to get the error message)

Jan

Re: Error while rotating image

Posted: 08 Sep 2020, 17:31
by Adarre
Hi, thank you for the answer

I have the following line in my logs

Code: Select all

mod_fcgid: stderr: PHP Warning:  imagecreatetruecolor(): Invalid image dimensions in /var/www/vhosts/sample.com/httpdocs/administrator/components/com_phocagallery/libraries/phocagallery/image/imagerotate.php on line 212, referer: https://www.sample.com/administrator/index.php?option=com_phocagallery&view=phocagalleryimgs
The problem arises for all images. As already said, I don't have this problem on other sites installed on the same server.

Vincent.

Re: Error while rotating image

Posted: 09 Sep 2020, 17:40
by Jan
Hi, this can be related to only one image which can have some wrong format. Are you able to see which image is managed when this error occurs?

Jan

Re: Error while rotating image

Posted: 10 Sep 2020, 12:09
by Adarre
Hi.

The problem arises for all images, without exception. Including new images that I just uploaded.

Vincent.

Re: Error while rotating image

Posted: 12 Sep 2020, 15:56
by Jan
Are you able to debug the variable on line 212? E.g. with print_r?

Image

administrator\components\com_phocagallery\libraries\phocagallery\image\imagerotate.php

Jan