cyberco wrote:
> Thanks,
>
> I've tried the StringIO option as follows:
>
> =
> img = Image.open('/some/path/img.jpg')
> img.thumbnail((640,480))
> file = StringIO, StringIO()
> img.save(file, 'JPEG')
>
> =
>
> But it gives me:
>
"cyberco" <[EMAIL PROTECTED]> wrote:
> Thanks,
>
> I've tried the StringIO option as follows:
>
> =
> img = Image.open('/some/path/img.jpg')
> img.thumbnail((640,480))
> file = StringIO, StringIO()
Is the above line exactly what you tried? If it is, the comma and
Thanks,
I've tried the StringIO option as follows:
=
img = Image.open('/some/path/img.jpg')
img.thumbnail((640,480))
file = StringIO, StringIO()
img.save(file, 'JPEG')
=
But it gives me:
=
exceptio
"cyberco" <[EMAIL PROTECTED]> wrote:
> I'm using web.py to send an image to the client. This works
> (shortened):
>
> print open(path, "rb").read()
>
> but this doesn't:
>
> img = Image.open(path)
> img.thumbnail((10,10))
> print img.getdata()
>
> or
>
> print img.load()
>
>
> How do I get
I'm using web.py to send an image to the client. This works
(shortened):
print open(path, "rb").read()
but this doesn't:
img = Image.open(path)
img.thumbnail((10,10))
print img.getdata()
or
print img.load()
How do I get the bytes of the Image object? 'getdata()' seemed the
way, but unfortuna