File: imagelist.py

package info (click to toggle)
python-pgmagick 0.7.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,132 kB
  • sloc: cpp: 3,672; python: 2,082; makefile: 160; sh: 40
file content (14 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from pgmagick import Image, ImageList, Geometry, Color

imgs = ImageList()
for color in ('red', 'blue', 'green', 'black', 'yellow'):
    imgs.append(Image(Geometry(200, 200), Color(color)))
imgs.animationDelayImages(100)
imgs.scaleImages(Geometry(100, 100))
print len(imgs)
imgs.writeImages('output.gif')

imgs = ImageList()
imgs.readImages('output.gif')
for img in imgs:
    print img