Resize image NO PIL!!

C

cbmeeks

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
 
D

Dave Benjamin

cbmeeks said:
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
 
C

cbmeeks

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
 
D

Daniel Nogradi

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
 
A

Aahz

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.
 
C

cbmeeks

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top