android - .gif Image as source runs nicely in Windows kivy program . Running via kivy Launcher shows background of gif image -
i running program showing .gif image in widget , works when run app using kivy launcher .gif image comes square box when image without backgrund .
any 1 ideas , why behaving differently on android , windows .
please see below .kv code example of how used .gif image . using .gif image button .
<butimage@buttonbehavior+asyncimage> canvas.before: color: rgb: (0, 0, 1) pushmatrix rotate: axis: 0,0,1 angle: 20 origin: self.center source: "images/butterflybluex.gif" canvas.after: popmatrix
...
first make sure package pil/pillow [just add 1 of requirements while building apk] gif loading, otherwise pure python loader slow android used, second please elaborate mean square box?
update: updated example shows using asyncimage local source, async image ment used remote url local sources can use image
class.
second: if getting white background instead of image gave wrong path. make sure image present in directory or directory present in right place on launcher.
update 3: issue stated earlier gif image loader using pil. not images work it. works on desktop cause pil isn't installed , pure python gif loader used instead. loader not usable on android cause of speed issues.
one workaround use gimp open , save image. should work then. 1 other way contribute , fix: loader using pil gif...(i must warn there many different gifs on web each own changes. making sure 1 works lead others getting broken.)
to reproduce issue on desktop install pillow.
there many artifacts can come while using gifs animation, i'd recommend use images(png/jpg...) in .zip
, set source. way rid of artifacts.
please make sure gif or .zip animation provided image class, used situations don't need control animation lot. static animations don't change.
if animations needs go beyond should manage animation manually loading sprite sheet in atlas.
Comments
Post a Comment