Jump to content

[Form] Convert to jpg, resize and rename


Yves

Recommended Posts

I've done some searches about a upload form to converting images to .jpg. What I found is that either ImageMagick or GD has to be installed. I had a look and GD is installed. I guess it only has to be installed for certain commands to work. correct me if I'm wrong.

 

I would like to have something similar to this, but not so advanced.

http://tools.dynamicdrive.com/imageoptimizer/

 

I'd like a form where people can enter their first and last name and browse to an image (of themselves)

Name: John Doe

Photo: browse photo (.gif, .bmp, .png allowed)

 

When submitted it would be stored in an 'uploads' folder,

converted to .jpg,

re-sized (max. size 160 width x 200 height),

named 'Photo-John-Doe.jpg',

delete original uploaded .gif, .bmp ot .png,

and show new .jpg underneath the upload form.

 

I greatly appreciate all help ;)

Link to comment
Share on other sites

I hope you didn't read all that, because I've found a great PHP Upload Script called class.upload.php and it is fantastic. I had to totally change it though, but it is doing what I wanted. 8)

 

I wanted to ask something I can't do with it. I want set a crontab job executing a script every 24 hours that deletes all files older then 5 minutes in the home/user/www/convert/uploads/ folder. How'd that script look like?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.