i have an image which width is 213 and height is 200 when i echo the image from my database and i resize it (echo "<img src='company/$present' width='70' height='68'/>" the image was not as clear as when it was 213 * 200. how can i make the image smooth like the original after i have resize it to 70 * 68 or rather when i increase above 213 * 200. <?php $query = "SELECT * FROM photo"; $result = mysql_query ($query) or die('query error'); $count = 0; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)){ $image = $line[picname]; echo "<img src='company/$image'/> "; $count++; } ?> Code (markup):
Something like this will work http://www.bitrepository.com/resize-an-image-keeping-its-aspect-ratio-using-php-and-gd.html