Linguica Posted March 30, 2017 Share Posted March 30, 2017 I ran into + solved this issue today, but I always like to write these sorts of things down for posterity in case I need to refer to it in the future or if someone else searches for the same issue and comes across this thread. A user on my forum wanted to use the following animated GIF as his avatar: But when he uploaded it and it was processed by Imagemagick, the resulting thumbnail version looked like this (seizure warning for those susceptible): This is not very useful. I managed to track down in the ImageMagick documentation the following: Quote The traditional way in ImageMagick to optimize an animation, making the result smaller and faster to download and animate, is to "-deconstruct" its "-coalesce" form. This is no longer recommended. Instead you use should use the General GIF Optimizer. To make a long story short, IPS uses a "deconstruct" command that Imagemagick supports that is supposed to optimize an animated GIF by only saving the portions of each frame that are actually updated from one frame to the next. Unfortunately it has a known issue with transparent GIFs where parts of the image switch from transparent to opaque or vice versa, resulting in a horrible flashing. With this in mind, I went into the Imagemagick.php file that controls avatar resizing and so forth, and changed the two instances of deconstructImages() to instead use optimizeImageLayers() and the problem was solved. If you're having a similar issue this is worth trying out at least. Link to comment Share on other sites More sharing options...
DSystem Posted March 30, 2017 Share Posted March 30, 2017 Good hint. I've tested this avatar here (Forum IPS) and had no problems In my forum the avatar has blinked. I think it's a good upgrade for the next IPS version Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.