Well, as it didn't work out the way I wanted I discarded the code. I could add it again and add an option to the settings UI for it. By the way, what do you mean with "creating the image pattern"? The code for playing the animation is in "/usr/lib/advanced-clock-plugin/pixbufanimationplayer.py"