Resize image NO PIL!!

Daniel Nogradi nogradi at gmail.com
Tue May 29 11:11:24 EDT 2007


> I have created an image hosting site and when a user uploads an image,
> I want a service to run on the server to create a few thumbnails while
> the user does other things.
>
> My stupid host (pair.com) doesn't have PIL installed and I'm too much
> of a stupid newbie to figure out how to get it to work with them
> (access denied while installing it, of course).
>
> Also, they don't have any python interface setup for GD.
>
> Anyway, I don't know what my options are.  I'm thinking:
>
> 1) Find another host with mod_python, PIL, and other Python goodies
> 2) use PHP to create the thumbnails
> 3) Open the images into a buffer and try to do the calculations
> myself
>
> I'm thinking I might have to go with 1.
>
> I want the script to run as a service so I don't know how well number
> 2 would work and I certainly don't want number 3 (on a time-line
> here).

Why don't you put PIL where your modules are? You are surely allowed
to upload your own python modules somewhere where you can access them
(and import them) so you can put PIL into the same place and happily
import them just as any other module you wrote. You might need to find
out what the architecture of the machine is (as far as I remember PIL
has some C extensions) and compile PIL for that architecture.

HTH,
Daniel



More information about the Python-list mailing list