[PYTHON IMAGE-SIG] The Image.new() function doesn't initialize the new image
Fred L. Drake
Fri, 17 Jan 1997 08:43:38 -0500 (EST)
Fredrik Lundh wrote:
> Now, the only problem is whether I should change the documentation or
> the implementation. Opinions?
I have slightly mixed feelings on this one. I like the idea of it
being initialized to something known, but a new implementation of
Image.new() can be provided by applications that want that interface.
The current implementation has a performance advantage which is
probably small most of the time, but hard to regain once lost. I'd
revise the documentation for this one, and interested applications
could do something like:
def newImage(mode, size, color=None):
if color is None:
color = DEFAULT_COLORS[mode]
return Image.new(mode, size, color)
Fred L. Drake, Jr.
Corporation for National Research Initiatives
1895 Preston White Drive
Reston, VA 20191-5434
IMAGE-SIG - SIG on Image Processing with Python
send messages to: email@example.com
administrivia to: firstname.lastname@example.org