Dynamically generated logo SourceForge.net Logo

Zope Image (ZImage)

ZImage is a collection of python classes that dynamically paint png image files , with the plan of becoming a Zope product.

It can take a script like:

def view(text=, size=, angle=):
  rect=img.rectangle(1, 1, 10, 40, color.BLUE)
  img.line(10, 10, 90, 70, color.RED, 10, (10,5))
  img.rectangle(20, 10, 70, 50, color.GREEN, color.YELLOW, 5)
  img.arc(10, 20, 60, 70, 270, 180, color.rgba(0,0,0xff,0x40), 5)
  img.text(15, 70, text, size, None, color.BLACK, angle, fonts.helr____)
  img2=Image(150, 150, color.GREY)
  img2.rectangle(3, 3, 8, 38, color.RED)
  img2.append(img, 10, 50)
  return img2.as_png()
And it as a png image.

I have been unable to find any solutions to the problem of dynamically creating images in Zope - hence this project. The paint module does most of the work, but I want to create a Zope Product to wrap around it so I can use it within Zope.

I have already got it to work using an External Method and a Python Script inside Zope. But I thought it would be handy for other developers to use if it were a Zope Product itself. Future developments could be Bar Charts etc...