Options - Rotate 90 counter clockwise not working

59 views
Skip to first unread message

djk

unread,
Mar 23, 2025, 3:51:12 PMMar 23
to Gallery 3 Users
This option has worked in the past but it has been a long time since I have worked my albums. When I click on the rotate 90 options nothing happens. What could be missing or causing the rotate option not to work?

Gerardo L. Cahn

unread,
Mar 23, 2025, 4:17:17 PMMar 23
to gallery...@googlegroups.com

In case it helps: in my gallery, the rotation works but it does not refresh the image: I have to go to the next pic and back or some such to force it to refresh, and it is rotated as expected.

On 3/23/25 15:51, djk wrote:
This option has worked in the past but it has been a long time since I have worked my albums. When I click on the rotate 90 options nothing happens. What could be missing or causing the rotate option not to work? --
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/gallery-3-users/0a091b4b-8f42-49ec-bb7f-e249f56f4016n%40googlegroups.com.
-- 
// Gerardo L. Cahn <ger...@niuk.org>
//  linux, mac ... and, well, yes,
//        ((windows too)).

djk

unread,
Mar 23, 2025, 6:11:04 PMMar 23
to Gallery 3 Users
In my case that is not the issue. The rotate does not do anything. The page does not change in anyway and view another photo and going back and loading the 'rotated' photo it isn't rotated.

Adrian London

unread,
Mar 23, 2025, 7:43:45 PMMar 23
to Gallery 3 Users
Have you upgraded PHP recently?  Anything in the logs?

-- 
Adrian

djk

unread,
Mar 24, 2025, 9:56:17 AMMar 24
to Gallery 3 Users
Nothing is showing in the errors log for Apache. PHP is newer than when I last used the features years ago. Running PHP 8.3.19.

Adrian London

unread,
Mar 24, 2025, 11:19:54 AMMar 24
to Gallery 3 Users
Nothing will be in the Apache logs, as it's likely to be a Gallery error not a web server error.  You need to check the G3 logs in var/logs.

However, as you've upgraded PHP, the error might be to be due to that.  See if my solution in the related thread helps.

-- 
Adrian

djk

unread,
Mar 25, 2025, 10:37:47 AMMar 25
to Gallery 3 Users
Adrian,

Thank you. Your solution is the answer. The GD.php is in two locations on my system. One in Gallery3/var/system/... and the correct one to edit in /Gallery3/system/...

Here are the details of my resolution.

Error log
/Gallery3/var/logs/YYYY-MM-DD.log.php

--- error: ArgumentCountError [ 0 ]: imagerotate() expects exactly 3 arguments, 4 given
/Gallery3/system/libraries/drivers/Image/GD.php [ 293 ]
#0 /Gallery3/system/libraries/drivers/Image/GD.php(293): imagerotate()
#1 /Gallery3/system/libraries/drivers/Image.php(33): Image_GD_Driver->rotate()
#2 /Gallery3/system/libraries/drivers/Image/GD.php(81): Image_Driver->execute()
#3 /Gallery3/system/libraries/Image.php(390): Image_GD_Driver->process()
#4 /Gallery3/modules/gallery/helpers/gallery_graphics.php(52): Image_Core->save()
#5 /Gallery3/modules/gallery/controllers/quick.php(41): gallery_graphics_Core::rotate()
#6 [internal function]: Quick_Controller->rotate()
#7 /Gallery3/system/core/Kohana.php(302): ReflectionMethod->invokeArgs()
#8 /Gallery3/system/core/Event.php(208): Kohana_Core::instance()
#9 /Gallery3/application/Bootstrap.php(67): Event_Core::run()
#10/Gallery3/index.php(124): require('...')
#11 {main}


 vi .../Gallery3/system/libraries/drivers/Image/GD.php

        public function rotate($amount)
        {
                // Use current image to rotate
                $img = $this->tmp_image;

                // White, with an alpha of 0
                $transparent = imagecolorallocatealpha($img, 255, 255, 255, 127);

                // Rotate, setting the transparent color
                // fix for --- error: ArgumentCountError [ 0 ]: imagerotate() expects exactly 3 arguments, 4 given
                // .../Gallery3/system/libraries/drivers/Image/GD.php [ 293 ]
                // $img = imagerotate($img, 360 - $amount, $transparent, -1);  <--original
                $img = imagerotate($img, 360 - $amount, $transparent);

                // Fill the background with the transparent "color"
                imagecolortransparent($img, $transparent);


Adrian London

unread,
Mar 25, 2025, 11:04:19 AMMar 25
to Gallery 3 Users
Glad it fixed the issue.

However, you shouldn't have a g3/var/system directory at all.  Maybe you put a backup there once and forgot about i?

This is the content of my var directory:
Screenshot 2025-03-25 at 16.03.30.png
Reply all
Reply to author
Forward
0 new messages