From 174b4893f3a6d092b4766d43ac570f0e57ecd718 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 12 Oct 2021 09:45:52 +1100 Subject: [PATCH] Prefer global transparency for disposal method 2 --- Tests/images/dispose_bgnd_transparency.gif | Bin 0 -> 5616 bytes Tests/test_file_gif.py | 7 +++++++ src/PIL/GifImagePlugin.py | 8 +++----- 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 Tests/images/dispose_bgnd_transparency.gif diff --git a/Tests/images/dispose_bgnd_transparency.gif b/Tests/images/dispose_bgnd_transparency.gif new file mode 100644 index 0000000000000000000000000000000000000000..7c626fe72c0b521e9f5becc70c52231a4e235930 GIT binary patch literal 5616 zcmeH~Yg`j&+Qy&BfrJFYBn%;epp$Sggs1^ID%vE37%XBq*`Rcr04jB98}U%wwKfR} zgb*#KBDGL~BBI4MQ0Y<+?IZ!A6%o{0@UTlPT5NF_)VkWOo5jQKYxms`@9+J*^L^$w z&wXFl|GJ))Df0LPO&CDIUu6IXK~xHb?Li0)A}tCf2?XJ(2_PpKw?4&p(`sCDa`Ni5 zw6)pUn!G#%3XJ)nW(%%yJJk9+aMT)NuLkGd2j`o>rDibxA-H~o@V$+C^Yg{-p(TI+ zHr8UX?BBot?%lih@83Uh;&?C*J$35T=;-M9__%vi5E~mKTLMZn?9H1uA9@Si{et!I z^g_4WZ8RFW^I5;k1;typUWf+WW#H6a@R#Fk_jvsDk3Vi*3%#+WxIGM9K193rk?+?Z zhX3)?h3>J~FP(kgPfaly1eeRz`WAV3c-Vb4ZlE#XEj7Nog0g$J;p)|^0c^iWDp;{R zF@*-weQ`yZ;PuyEACCp@(U|)B`nI;V$;t12{`qeuB_*FN0GBRZYBO@HtE&eF27Wlk zxOwwtoB&FWrJidfxWA3O^zGQDOs3s#7cB~tEDi0l*{)u>tS!pFXAkcafwR%zGYjBn}Ubaw?l;A!Wd-39h?`-}*d_JF!Fqg6+PFVQD$f#Gn z!S8)Qp)V-PPuUj;zKa2WSpwYg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