Created attachment 196745 [details] How it looks Hi We have the problem, if we build php-gd (7.0,7.1,7.2) against the gdlib and not against the bundled PHP version - like PHP5.6 does (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217222) - .gif doesnt rendering correct for example in Contao 3.5.35. I tried to build php72-gd against the bundled gdlib-version and it worked that way. So is it may better to create this bug at graphics/gd ? Greetings Pascal
Created attachment 196746 [details] How it should looks like
(In reply to Pascal Christen from comment #0) > So is it may better to create this bug at graphics/gd Yes, this would be the better way. Since we no longer use the bundled version, the bug must be located in graphics/gd. As i a work around we can think about using bundled or ports version of graphics/gd an option. But currently i'm having not much time. My family has grown and this has prio. :D I added joneum@ to the cc. If you can up with an patch to fix the issue, he will test and commit it! :) Greetings, Torsten
(In reply to Torsten Zuehlsdorff from comment #2) Ok thanks Torsten! @Dirk Meyer <dinoex@FreeBSD.org> Should we try to fix it here or create an issue at https://github.com/libgd/libgd/issues ?
(In reply to Pascal Christen from comment #3) I can not reproduce the problem on FreeBSD 11.2 amd64 Do you have any sources to reproduce the issue with plain "graphics/libgd" ?
Created attachment 197108 [details] Simple Test case in C
Created attachment 197185 [details] Test Script for resizing .gif
Created attachment 197186 [details] Test .gif You can try this gif
Created attachment 197264 [details] output output from script
(In reply to Dirk Meyer from comment #8) yes and in PHP5.6 with bundled GD the background doesn't look like this...
The generate files looks fine with "xv". Dependent on the decoder they look different. gif2text shows some some difference: - ColorResolution = 3, BitsPerPixel = 6, BackGround = 0, Aspect = 0. + ColorResolution = 6, BitsPerPixel = 6, BackGround = 0, Aspect = 0. + ColorResolution = 6, BitsPerPixel = 6, BackGround = 0, Aspect = 0. Global Color Map: Sort Flag: off - 0: 6ch 6eh 6ch 1: b4h b2h b4h 2: 94h 92h 94h 3: d4h d2h d4h - 4: 84h 82h 84h 5: c4h c2h c4h 6: a4h a2h a4h 7: e4h e2h e4h - 8: 7ch 7ah 7ch 9: bch bah bch 10: 9ch 9ah 9ch 11: dch dah dch - 12: 8ch 8ah 8ch 13: cch cah cch 14: ach aah ach 15: 74h 76h 74h - 16: ech eah ech 17: 74h 72h 74h 18: b4h b6h b4h 19: 94h 96h 94h - 20: d4h d6h d4h 21: 84h 86h 84h 22: c4h c6h c4h 23: a4h a6h a4h - 24: 7ch 7eh 7ch 25: bch beh bch 26: 9ch 9eh 9ch 27: dch deh dch - 28: 8ch 8eh 8ch 29: cch ceh cch 30: ach aeh ach 31: ech eeh ech - 32: 00h 00h 00h 33: 00h 00h 00h 34: 00h 00h 00h 35: 00h 00h 00h + 0: 04h 02h 04h 1: 7ch 7ah 7ch 2: b4h b6h b4h 3: 9ch 9ah 9ch + 4: d4h d6h d4h 5: 8ch 8ah 8ch 6: c4h c6h c4h 7: ach aah ach + 8: ech eah ech 9: 6ch 6eh 6ch 10: 84h 82h 84h 11: bch beh bch + 12: a4h a2h a4h 13: dch deh dch 14: 94h 92h 94h 15: cch ceh cch + 16: b4h b2h b4h 17: 74h 76h 74h 18: 7ch 7eh 7ch 19: bch bah bch + 20: 9ch 9eh 9ch 21: dch dah dch 22: 8ch 8eh 8ch 23: cch cah cch + 24: ach aeh ach 25: ech eeh ech 26: 74h 72h 74h 27: 84h 86h 84h + 28: c4h c2h c4h 29: a4h a6h a4h 30: e4h e2h e4h 31: 94h 96h 94h + 32: d4h d2h d4h 33: 00h 00h 00h 34: 00h 00h 00h 35: 00h 00h 00h - Transparent Index: 32 + Transparent Index: 33 I see no easy fix here, please create an issue at https://github.com/libgd/libgd/issues I will attach a C-Source you can send as sample.
Created attachment 197268 [details] old output.gif old output, that shows the expected result.
Created attachment 197269 [details] code to reproduce the problem in plain C
confirmed it is not an php issue
(In reply to Dirk Meyer from comment #13) Wow, thank you Dirk! Yes I just updated the bug on Github: https://github.com/libgd/libgd/issues/473 I'm trying to improve my C-Skills ;)
any news here?
(In reply to Jochen Neumeister from comment #15) GitHub Issue is still unresovled.
https://gist.github.com/cmb69/c319f61e38ef10099657393ba7522236 seems working for me. I'll contact the developer tomorrow about his release plans otherwise I'll just cherry-pick this patch.
A commit references this bug: Author: dinoex Date: Sun Dec 30 14:00:46 UTC 2018 New revision: 488716 URL: https://svnweb.freebsd.org/changeset/ports/488716 Log: - fix rendering of gif PR: 231057 Obtained from: https://github.com/libgd/libgd/issues/473 Changes: head/graphics/gd/Makefile head/graphics/gd/files/patch-gd.c