[PYTHON IMAGE-SIG] Bug ?

Fredrik Lundh fredrik.lundh@image.combitech.se
Sun, 8 Jun 1997 19:18:44 +0200


> When I create new image with
> 
> Image.new("RGB",(sizex,sizey))
> 
> then it usually does not get initialized to all black
> as the manual claims. Usually it has some garbage pixels or
> even some previous image (in color) if you work interactively
> and have created some before.

Yep, it's definitely a buglet (the documentation and the code doesn't
match).  In 0.2b4, the syntax is:

	Image.new(mode, size) # don't initialize
	Image.new(mode, size, ink) # initialize to ink

In 0.3, this has been changed to:

	Image.new(mode, size) # initialize to black
	Image.new(mode, size, ink) # initialize to ink
	Image.new(mode, size, None) # don't initialize
	
to make life a bit easier...

Cheers	/F

http://hem1.passagen.se/eff (python stuff)
http://starship.skyport.net/crew/fredrik (more python stuff)

_______________
IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org
_______________