StefanRSA Posted June 22, 2009 Share Posted June 22, 2009 I am searching around for a script or tutorial helping to do the following: I have a form that will capture user data and want to add 4 image upload fields. On submit I want the 4 images to be uploaded and two thumbnail images created for each image to comply to size on screen and size on disk... Save each individual image name and uploaded folder url linked to the uploaded form to a MySql DB for later display... I found a lot of scripts that can create only 1 thumbnail and also a link to the original uploaded image... (Size might be to big????!!! People that will upload these images is not web orientated and might upload images over 300kb... To big for display on a web......???) Is there anybody that can direct me in doing what I want to do??? Thanks Quote Link to comment Share on other sites More sharing options...
flyhoney Posted June 22, 2009 Share Posted June 22, 2009 If you have a tutorial for 1 image upload, doing multiple is a simple as creating multiple "file" form elements. Once you've saved the images on the server, you can use either the GD or ImageMagick image libraries to manipulate the size of the image. http://www.vipercreations.com/tutorials/PHP/22.html Quote Link to comment Share on other sites More sharing options...
StefanRSA Posted June 23, 2009 Author Share Posted June 23, 2009 Hi Flyhoney. I now could get to the point where I can upload the images and create thumbnails, save it to a folder and make an entry to the db to allocate the images to a document. But I dont understand how GD or ImageMagick can munipulate the size of these created thumnails. Can you shed light on this... PLEASE? I want the server to create two new images of the one uploaded... One for Thumbnail with width 65pix and another with width of max 250pix. This is just to set a standard of image size for the site. I know I can manipulate the image size with html but this will make just the image apear smaller but do nothing for size on disk and if I do it the other way around I loose picture quality... Can you or anybody shed some light on this for me please ??? Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted June 23, 2009 Share Posted June 23, 2009 Ensure the GD library is installed on your server and use imagecopyresampled Quote Link to comment Share on other sites More sharing options...
StefanRSA Posted June 23, 2009 Author Share Posted June 23, 2009 Hi GingerRobot. GD library is installed on my server... Will read up about imagecopyresampled(). TY! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.