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
https://forums.phpfreaks.com/topic/87025-form-convert-to-jpg-resize-and-rename/
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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.