justlukeyou Posted February 18, 2011 Share Posted February 18, 2011 I am looking to resize images from a database and found this guide. It looks relatively simple. Is this the easiest method of resizing images. http://articles.sitepoint.com/article/image-resizing-php Link to comment https://forums.phpfreaks.com/topic/228088-simple-method-of-resizing-images/ Share on other sites More sharing options...
litebearer Posted February 18, 2011 Share Posted February 18, 2011 NOTE: that script only alters the html display size; you are still loading the full image. If you have multiple or very large images, it will consume more band width than either having 'pre-made' thumbs or actually creating a 'true' thumb on the fly. Of course on the fly means more processing time while pre-made consumes more server space. Link to comment https://forums.phpfreaks.com/topic/228088-simple-method-of-resizing-images/#findComment-1176223 Share on other sites More sharing options...
justlukeyou Posted February 19, 2011 Author Share Posted February 19, 2011 Thanks, I thought I could just resize the image inside the css div I already by using the standard image width function. But this has no affect but I dont understand why. <div class='productborder'> <a href='$link' target='_blank' width=\"80%\" ><img src='$image'/></a> </div> Link to comment https://forums.phpfreaks.com/topic/228088-simple-method-of-resizing-images/#findComment-1176868 Share on other sites More sharing options...
joshbedo Posted February 19, 2011 Share Posted February 19, 2011 I just coded a simple image resizer/renamer/uploader for my high school website Www.imstillreallybored.com/upload Currently has no validation so it will crash if you don't enter the right data so I still want to add that and then I'm adding a dropdown so you can select the directory you want to upload to you can achieve this using glob If you want I can post the code its two files, a resize class which figures out the image extension and resizes according to image according to extension php actually has processes built in to simplify everything. Then the main file sends everything to the class through a get and I have a small function to seperate the dimension variables. Link to comment https://forums.phpfreaks.com/topic/228088-simple-method-of-resizing-images/#findComment-1176878 Share on other sites More sharing options...
justlukeyou Posted February 19, 2011 Author Share Posted February 19, 2011 So I take it the idea of putting width=\"80%\" in wont work then lol Link to comment https://forums.phpfreaks.com/topic/228088-simple-method-of-resizing-images/#findComment-1176880 Share on other sites More sharing options...
litebearer Posted February 19, 2011 Share Posted February 19, 2011 Might look at this http://www.nstoia.com/sat/resize/ Link to comment https://forums.phpfreaks.com/topic/228088-simple-method-of-resizing-images/#findComment-1176904 Share on other sites More sharing options...
joshbedo Posted February 19, 2011 Share Posted February 19, 2011 putting 80% in the width changes the size through html which is a very bad idea first of all it actually takes longer to render an image then if it was just that size already without width styling. second of all it won't work on all images if you had an image of a person it would make them look 100 pounds more then they already are. Link to comment https://forums.phpfreaks.com/topic/228088-simple-method-of-resizing-images/#findComment-1176911 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.