[openstreetmap/openstreetmap-website] Animations for traces (#2132)

mmd notifications at github.com
Wed Apr 3 17:20:53 UTC 2019


It looks like this is triggering a bug inside the libgd2 library, rather than the gd2-ffij wrapper: if two consecutive frames are identical, they try to create a temporary image of size 0x0. This triggers the "GD Warning", and then the trouble starts by leaving that gdImageGifAnimAddCtx method via some  `goto fail_end;`

To cut a long story short, my proposal would be to skip the gif optimization mode in case both frames are identical: https://github.com/mmd-osm/openstreetmap-website/commit/7f138fb014e201e9e6b63ababf57d0f7c53bd86c

This passes the unit tests while still producing proper images.

---

References:

https://github.com/libgd/libgd/blob/553702980ae89c83f2d6e254d62cf82e204956d0/src/gd_gif_out.c#L723-L727
https://github.com/libgd/libgd/blob/553702980ae89c83f2d6e254d62cf82e204956d0/src/gd_gif_out.c#L793-L800

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2132#issuecomment-479581423
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190403/2bd12ff7/attachment.html>


More information about the rails-dev mailing list