[Tutor] Saving an Image in a Given Format
Luke Paireepinart
rabidpoobear at gmail.com
Sun Mar 30 04:47:28 CEST 2008
On Sat, Mar 29, 2008 at 8:15 PM, Wayne Watson <sierra_mtnview at sbcglobal.net>
wrote:
> I see that I misunderstood the syntax of Python for:
>
> current_image.convert
> current_image.save
>
> current_image is a "pointer" whose type is some class, so convert() and
> save() must be methods in that class.
Yes, they are methods of a class. self.current_image is just a normal
python variable that stores a reference to a class instance. You can call
it a 'pointer' because it's probably similar to that internally, but it's
easier just to think about it as a label for a specific calss instance.
> The question is what class/module?
> PIL?
You need to give us the full code.
There will be an import statement at the top, and you can figure out where
current_image is created. These clues will lead you to the library that
they're using.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080329/da8ec8d0/attachment.htm
More information about the Tutor
mailing list