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 ?
Error while rotating image
- Jan
- Phoca Hero

- Posts: 49138
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error while rotating image
Hi, try to open this file:
administrator\components\com_phocagallery\libraries\phocagallery\image\imagerotate.php
and on line cca 212 delete the symbol "@"
FROM:
TO:
Maybe you will get more detailed information about the error from your system. 
(of course PHP error reporting needs to be enabled to get the error message)
Jan
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]);Code: Select all
$image3 = ImageCreateTruecolor($dst[2], $dst[3]);(of course PHP error reporting needs to be enabled to get the error message)
Jan
If you find Phoca extensions useful, please support the project
-
Adarre
- Phoca Newbie

- Posts: 3
- Joined: 03 Sep 2020, 15:48
Re: Error while rotating image
Hi, thank you for the answer
I have the following line in my logs
The problem arises for all images. As already said, I don't have this problem on other sites installed on the same server.
Vincent.
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=phocagalleryimgsVincent.
- Jan
- Phoca Hero

- Posts: 49138
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error while rotating image
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
Jan
If you find Phoca extensions useful, please support the project
-
Adarre
- Phoca Newbie

- Posts: 3
- Joined: 03 Sep 2020, 15:48
Re: Error while rotating image
Hi.
The problem arises for all images, without exception. Including new images that I just uploaded.
Vincent.
The problem arises for all images, without exception. Including new images that I just uploaded.
Vincent.
- Jan
- Phoca Hero

- Posts: 49138
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error while rotating image
Are you able to debug the variable on line 212? E.g. with print_r?

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

administrator\components\com_phocagallery\libraries\phocagallery\image\imagerotate.php
Jan
If you find Phoca extensions useful, please support the project