On Jan 16, 12:16 am, [EMAIL PROTECTED] wrote:
> Hi, noob here
>
> Im using mod_python and apache2 using psp for output of page, i open a
> file and resize it with the following code
>
> <%
> import Image, util
>
> fields = util.FieldStorage(req)
> filename = fields.getlist('src')[0]
>
> path = '/var/www/content/' + filename
> size = 128, 128
>
> im = Image.open(path)
> print im.resize(size, Image.ANTIALIAS)
> %>
>
> so for one, I dont think print does much with psp as far as i can
> tell, i cant even do a print 'hello world', it has to be a
> req.write('hello world'), but i cant req.write the im.resize. The
> manual for im.resize states that its return can go ahead and be
> streamed via http but I get a blank page when im expecting to see
> image characters dumped to my screen. Python doesn't throw up any
> errors. Im not sure where else to look or what to do.
>
> Thanks for any help,
> Daniel

its worth noting that ive tried using
print "Content-Type: image/jpeg\n"
before the print im.resize and still no luck
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to