cocoa - Animated GIF in NSImageView -
i'm using nsimageview display animated gif around 80 frames, each frame being 20ms long. nsimageview can display gif animation right 'out of box', problem needs cpu, around 10% continuously (on core i5 proc). instruments shows spends lot of cpu time decoding gif.
to make more efficient, have tried following without success:
putting frames inside qtmovie , playing (uses 4% process , 15% qtkitserver process plays movie)
drawing directly view cgcontextdrawimage (~5% cpu usage) - didn't export gif's frames, created cgimageref 30x30px .png had lying around.
i don't know else try. subclassing nsimageview , somehow caching images sounds idea but, alas, i'm beginner in cocoa... ideas appreciated. thanks!
check out this article raphael schaad. that's performant gets without super complicated. github repo looks it's ios don't think it'll hard port.
Comments
Post a Comment