[Image-SIG] Mutable images

Alec Bennett wrybread at gmail.com
Fri Nov 21 21:31:22 CET 2008


Seems too obvious to mention, but:

src_image2 = src_image.resize( (20,20) )




On Fri, Nov 21, 2008 at 12:22 PM, Christopher Brooks
<cab938 at mail.usask.ca>wrote:

> I want to resize an image using something like:
>
> src_image.resize( (20,20) )
>
> This doesn't work, since resize() returns the new image.  So something
> like:
>
> src_image = src_image.resize( (20,20) )
>
> works instead.  Problem is that I have other references to the image that
> src_image is pointing to, and I want them to be updated as well.  I thought
> maybe there would be a load() that takes an Image as a parameter and thus
> changes the underlying object but not the reference, but this doesn't seem
> to be the case.
>
> Any thoughts on part of the library I'm missing?
>
> Chris
>
> --
> Christopher Brooks, MSc.
> Web: http://www.cs.usask.ca/~cab938 <http://www.cs.usask.ca/%7Ecab938>
> Mail: Advanced Research in Intelligent Educational Systems Laboratory
>      Department of Computer Science
>      University of Saskatchewan
>      176 Thorvaldson Building
>      110 Science Place
>      Saskatoon, SK
>      S7N 5C9
>
>
>
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20081121/c52d8481/attachment-0001.htm>


More information about the Image-SIG mailing list