|
|
 |
 |
 |
 |
Python Programming Language
|
 |
 |
 |
 |
 |
 |
 |
 |
Resize image NO PIL!!
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). Any suggestions? Thanks cbmeeks http://www.signaldev.com
cbmeeks wrote: > 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
Have you checked to see if Imagemagick is available? You could use the "convert" command via os.system or something along those lines... Dave
Nope. They don't support that either. I emailed them (again) asking for these features or at least see if they are in the works sometime in the future and I keep getting their standard response which is basically "you can do it yourself if you upgrade to our $249/mo dedicated plan". I'd go with EC2 for $70/mo first! Thanks cbmeeks On May 28, 11:12 pm, Dave Benjamin <r@lackingtalent.com> wrote:
> cbmeeks wrote: > > 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 > Have you checked to see if Imagemagick is available? You could use the > "convert" command via os.system or something along those lines... > Dave
> 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
In article <1180406398.615904.22@g4g2000hsf.googlegroups.com>, cbmeeks <cbme @gmail.com> wrote: >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
webfaction.com -- I almost went with pair.com because they're reliable, but I decided to choose a provider that supports Python. -- Aahz (a@pythoncraft.com) <*> http://www.pythoncraft.com/ "as long as we like the same operating system, things are cool." --piranha
Thanks for the suggestions. I checked out webfaction.com and they looked nice. Might move from Pair over there. I think what I am going to do is splurge and go with Amazon's EC2 ($72/ month). But it's root level access so I can do anything. Last night I got a Python daemon running that monitored the MySQLdb every 10 seconds (just for testing) and it would process "thumb_jobs" by calling PIL. Worked nicely. I will have to experiment with tight batch control (as in, not processing the same pic more than once) and threading. cbmeeks http://www.signaldev.com On May 30, 5:50 pm, a@pythoncraft.com (Aahz) wrote:
> In article <1180406398.615904.22 @g4g2000hsf.googlegroups.com>, > cbmeeks <cbme@gmail.com> wrote: > >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 > webfaction.com -- I almost went with pair.com because they're reliable, > but I decided to choose a provider that supports Python. > -- > Aahz (a@pythoncraft.com) <*> http://www.pythoncraft.com/ > "as long as we like the same operating system, things are cool." --piranha
|
 |
 |
 |
 |
|