[Image-SIG] SunOS Problem?

Torsten Gallmeister galle@rostock.zgdv.de
Fri, 08 Oct 1999 11:59:59 +0200


Hello,

if I execute the code below with Pyhton1.5.2 and PIL-1.0 at SunOS 5.6
and I only get an black rectangle. With Linux does it work.
Is this an known problem or is there another solution to put colors in a

new image?

Thanks,
        Torsten.



######################################
import Image
import ImageDraw

im = Image.new("P", (400, 400), 0)

im.putpalette([
            0, 0, 0, # black background
            255, 0, 0, # index 1 is red
            255, 255, 0, # index 2 is yellow
            255, 153, 0, # index 3 is orange
        ])

d = ImageDraw.ImageDraw(im)
d.setfill(1)

d.setink(1)
d.polygon((0, 0, 0, 400, 400, 400))

d.setink(2)
d.rectangle((100, 100, 300, 300))

d.setink(3)
d.ellipse((120, 120, 280, 280))

im.save("out.gif")
############################################################