I was sticked in showing images from mysql, and another thing, if the user gives a single image , can we give a thumbnail on its own
plz reply soon

for uploading images : http://www.wellho.net/resources/ex.php4?item=h113/pic_up.php4

for resizing jpegs you could use something like this:

<?
$srcim = imagecreatefromjpeg("original.jpg");
list($width, $height, $value, $params) = GetImageSize("original.jpg");

$new_width=150;       
$factor = $width/$new_width;
$new_height=$height/($width/$new_width);

$dstim = ImageCreate($new_width, $new_height);
$dstim = imagecreatetruecolor($new_width, $new_height);
imagecopyresized($dstim, $srcim, 0, 0, 0, 0, $new_width, $new_height, $width, $height);  


imagejpeg($dstim);

?>

By changing this line: $new_width=150; to another number, you can rescale the thumbnails

Niek

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.