I had a moment so I threw together an extremely simple example using a Python library that ships with the latest version of Indigo (Pillow). There's lots of room for refinement, but it shows the nuts and bolts. Not sure it's exactly what you were looking for, but maybe it'll serve as a jumping off point.
- Code: Select all
# #! /usr/bin/env python
# # -*- coding: utf-8 -*-
from PIL import Image, ImageDraw
images = []
save_file = "/Library/Application Support/Perceptive Automation/Indigo 2022.1/Web Assets/images/controls/static/anim.gif"
text = "Hello World"
height = 50
width = 100
color_1 = ("#FFFFFF", "#FFFFFF", "#FFFFFF", "#000000")
color_2 = ("#FF0000", "#FF6666", "#FF9999", "#FFFFFF")
step = 4
for i in range(0, step):
im = Image.new('RGB', (width, height), color_2[i])
draw = ImageDraw.Draw(im)
draw.text((18, 18), text, color_1[i])
images.append(im)
images[0].save(save_file, save_all=True, append_images=images[1:], optimize=True, duration=1000)
If you view it in Preview, it will continually rotate. But if you view it in Safari, it will only cycle once.
- anim.gif (3.96 KiB) Viewed 1201 times