Adamwts Posted April 1, 2007 Share Posted April 1, 2007 Hey, I've made a simple image hosting script in PHP. What I would like it to do, say like someone uploads a 1024x768 image to the site, when uploading that image, it will automatically resize it to something like 200x200px if it is over 200x200px. For example, I have 2 images that i want to upload, one 150x150px which will stay the same size as the thumbnail, and one that is 700x473px which will be resized down to 200x200px because it is over the limit. (limit is 200x200px). I would be greatful If someone could code this script for me please. p.s. there are 4 different extensions that can be uploaded: GIF, JPG, JPEG and BMP, and will need to work for all thoes file extensions. Thanks, Adam! Quote Link to comment Share on other sites More sharing options...
fert Posted April 1, 2007 Share Posted April 1, 2007 http://us.php.net/manual/en/function.imagecopyresampled.php Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted April 1, 2007 Share Posted April 1, 2007 No one here will write it for you. You can find literally hundreds of scripts already written to do this by using google... phpclasses alone has over 200 results returned for the keyword "thumbnails". http://www.google.com/custom?domains=www.phpclasses.org&q=thumbnails&sa=Search&sitesearch=www.phpclasses.org&client=pub-2951707118576741&forid=1&channel=5742870948&ie=ISO-8859-1&oe=ISO-8859-1&cof=GALT%3A%23663399%3BGL%3A1%3BDIV%3A%23222222%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AA3C5CC%3BLBGC%3AA3C5CC%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BLH%3A50%3BLW%3A256%3BL%3Ahttp%3A%2F%2Ffiles.phpclasses.org%2Fgraphics%2Fgooglesearch.jpg%3BS%3Ahttp%3A%2F%2Fwww.phpclasses.org%2Fsearch.html%3BFORID%3A1%3B&hl=en Quote Link to comment Share on other sites More sharing options...
Adamwts Posted April 1, 2007 Author Share Posted April 1, 2007 i can't really seem to get it so it uploads the image file as it is and also get it to upload a smaller version of that image file (example: origional image file='1024x768px' origional image file thumb='200x200px'. I really do need help, as I have been trying for like 6 hours to get it to work now. 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.