Hello All,

I get an image from a web page (via urlopen), and like to make it
twice the size.
I'm trying (using PIL):
---- code ----
from ImageFile import Parser
def double(image_data):
    image_parser = Parser()
    image_parser.feed(image_data)
    im = image_parser.close()
    new_size = tuple(map(lambda x: 2 * x, im.size))
    new = im.resize(new_size)

    return new.tostring("gif", "P") # This is probably the problem,
have no idea

image_data = urlopen(url).read()
image_data = double(image_data)
---- code ----

However I don't get a valid GIF image.

Any ideas?

Thanks,
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to