ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> image-sig
image-sig
Re: [PYTHON IMAGE-SIG] The Image.new() function doesn't initialize the new image
by Guido van Rossum other posts by this author
Jan 17 1997 1:38PM messages near this date
[PYTHON IMAGE-SIG] The Image.new() function doesn't initialize the new image | Re: [PYTHON IMAGE-SIG] The Image.new() function doesn't initialize the new image
>  On page 15 in the PIL handbook, the following is said about the
>  Image.new function:
>  
>     new( mode, size ) or new( mode, size, colour ) creates a new image
>     with the given mode and size. Size is given as a 2-tuple. If colour is
>     not given, the image is initialised to solid black.
>  
>  The last sentence is not true; if the colour is not given, the image
>  is not initialised at all.
>  
>  Now, the only problem is whether I should change the documentation or
>  the implementation.  Opinions?

I assume that initializing the image takes a reasonable amount of
time.  It is useful to have a way to avoid wasting this time (often
while the user is waiting!) for applications that know they are going
to set every pixel anyway.

So unless you are prepared to provide a different interface for
creating an uninitialized image, I'd say, fix the documentation.

--Guido van Rossum (home page: http://www.python.org/~guido/)

_______________
IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@[...].org
administrivia to: image-sig-request@[...].org
_______________
Thread:
Fredrik Lundh
Guido van Rossum
Fred L. Drake
Fredrik Lundh

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved