how to resize and make the thumbnail view of the photos like in facebook or other sites without distorting the photos
new_divine
0
Newbie Poster
Recommended Answers
Jump to Posthow to resize and make the thumbnail view of the photos like in facebook or other sites without distorting the photos
Here is a function that i use which works like a charm for me...
function img_resize($name,$filename,$new_w,$new_h) { $system=explode(".",$name); if (preg_match("/jpg|jpeg/",$system[1])){$src_img=imagecreatefromjpeg($name);} if (preg_match("/png/",$system[1])){$src_img=imagecreatefrompng($name);} if (preg_match("/gif/",$system[1])){$src_img=imagecreatefromgif($name);} $old_x=imageSX($src_img); $old_y=imageSY($src_img); …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.