paparanch Posted March 29, 2009 Share Posted March 29, 2009 hellow world! i tried hard not to come here and ask for help to prove something to myself, but i just can't do this. here is the situation: actually i saw a lot of tutorials regarding resizing and croping photos using php, but most of them were done during uploading process...in my case i wanted to display images from a certain directory that are cropped and resized ON THE FLY...so meaning there is no thumbnail image that correspond to its large image...something like that... to make things more clear, i have big images from "myphotos" folder and i wanted to display it in the browser already cropped and resized proportionally...so here is my code so far...it only display images from my folder.... <? $p_cat = $row['project_name']; $handle = opendir('portfolio/'.$p_cat.'/'); if($handle) { while(false !== ($file = readdir($handle))) { if(preg_match("/\w+(.jpg)/",$file)) { echo "<div class='update_pics_frame'>"; echo "<div class='update_pics'>"; echo "<a class='mb' id='mb1' title='$event_name_formatted' href='/arcke/portfolio/".$row['project_name']."/$file'>"; echo "<img src='/arcke/portfolio/".$row['project_name']."/$file'>"; echo "</a>"; echo "</div>"; echo "</div>"; } } closedir($handle); } ?> tnx in advanced gurus! Link to comment https://forums.phpfreaks.com/topic/151611-resize-and-crop-photos-from-directory/ Share on other sites More sharing options...
chmpdog Posted March 29, 2009 Share Posted March 29, 2009 I found this software online: http://www.mywebmymail.com/?q=content/easyphpthumbnail-class & the download: http://www.mywebmymail.com/?q=system/files/easyphpthumbnail.zip Link to comment https://forums.phpfreaks.com/topic/151611-resize-and-crop-photos-from-directory/#findComment-796250 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.