PHP Classes

Fix for multiple images at once.

Recommend this page to a friend!

      GIF Animation Resizer  >  All threads  >  Fix for multiple images at once.  >  (Un) Subscribe thread alerts  
Subject:Fix for multiple images at once.
Summary:Starting two resize operations in the same second will fail.
Date:2017-12-05 20:52:31

  1. Fix for multiple images at once.   Reply   Report abuse  
Picture of Neorush Neorush - 2017-12-05 20:52:31
Had a page with multiple animated gifs on it. If the two image resizes start in the same second some frames from each image get incorporated into one image and the second image resize will fail completely. This is because each frame is essentially saved temporarily as frame_".time()."_".str_pad($i,2,"0",STR_PAD_LEFT).".gif" This is probably why refreshing the page would sometimes "fix" broken gifs in my case. Not relying on a timestamp as part of the temp file name fixes this issue. An md5 hash works great.

In the Libary had to change Line 68: