Hi I"m using 2.5
the Gif animation file that I uploaded to in the grid format didn"t show the animation.
irith
Hi Irith,
EDIT: Please ignore, see below. "What exact version of Moodle and the Grid format (the contents of the version.php file) are you using please? What theme are you using? What browser and version are you using?"
Cheers,
Gareth
Ok, a quick test on Moodle 2.6.1 and my latest unreleased development version 2014011400 shows that I can replicate the problem. However, the format uses the PHP GD library to resize the uploaded images which currently does not support reading of animated Gif's - http://www.php.net/manual/en/function.imagecreatefromgif.php. There is a link to another library - http://www.gdenhancer.com/ - which claims to support them. However it is for PHP 5.4 and only M2.7 is proposed to have PHP 5.4 as a minimum requirement. Thus cannot be the solution in M2.5 or M2.6. Additionally I don't know at this moment in time how difficult it would be to use the library or indeed might make the installation process difficult.
Therefore at this moment in time, there is nothing I can do to solve the problem. Sorry.
Cheers,
Gareth
Now that Moodle 2.7 has been released and stabilized, how do things look for animated gif support?
I've look a bit into it, and there seems to be 2 potential workarounds:
1. Imagemagick instead of GD, supports animated gifs (at least according to wikipedia), but is a seperate php extension to be installed.
2. Offer direct uploads without processing the files through GD. Perhaps an option could be added to the "Set the image resize method" dropdown for "None" or "No scaling".
Hope you consider these possibilities.
Cheers,
John
Dear John,
Thank you for the information. With:
Ok, I do now see the possibility that when uploading that gif images are left unprocessed and scaled using CSS. The code as it stands was designed to be as optimal as possible. However, if a compromise that the full size of the file is downloaded, then it is conceivable that it would work behind the scenes without user interaction. This will take time to figure out and I don't have time at the moment. But I'll keep it in the back of my mind for sometime in the future.
Cheers,
Gareth
Hi Gareth,
1. Understandable point, more moving parts usually lead to more trouble
2. A javascript alert notifying that the user would have to upload a resized image could be shown just after selecting the option.
A responsive css image resize method could work, and the end result should be sharper than running it through GD with another processing cycle.
Thanks for your consideration again and keep up the great work,
John