...

View Full Version : Resize image's thumbnail



grandgefx
01-22-2012, 01:48 PM
Hi, I need to resize the image's thumbnail, how can I do it?
this my php code, which part of the code that I need to change or add?
I want to resize the thumbnail to 100x67


?php
for($i=1;$i<10;$i++)
{
if(!empty($foto[$i]))
{
if($i==1)





{





$foto_first=$foto[$i];





}



echo "<img border=0 width=0px height=2px src='conf/i/".$foto[$i]."'>";



$dataku.="'".$foto[$i]."': { thumbnail: 'thumb/".$foto[$i]."'},";
}
else
{



$i--;



break;
}
}

$dataku=substr($dataku,0,-1);
?>



<link rel="stylesheet" href="css/slideshow.css">






<script src="js/mootools-1.3.1-core.js"></script>



<script src="js/mootools-1.3.1.1-more.js"></script>



<script src="js/slideshow.js"></script>



<script src="js/slideshow.flash.js"></script>



<script>





window.addEvent('domready', function(){







var data = { <?php echo $dataku;?>};

new Slideshow.Flash('flash', data, { color: ['tomato'],duration: 1500, delay: 10000, height: 400, hu: 'conf/i/', width: 500});














});



</script>






<div style="padding-bottom:350px;padding-right:100px">



<div id="flash" class="slideshow">





<img src="conf/i/<?php echo $foto_first; ?>" alt="1" height=100px><br>



</div>



</div>

KuriosJon
01-22-2012, 01:54 PM
To change the size of an image in HTML, add the following attributes:


width="100px" height="67px"

For example:


<img src="image.jpg" width="100px" height="67px"/>

grandgefx
01-22-2012, 03:14 PM
To change the size of an image in HTML, add the following attributes:


width="100px" height="67px"

For example:


<img src="image.jpg" width="100px" height="67px"/>

Hi thank you for the quick response,

but what I really want to know is how to set the thumbnail pic's size
I think I need to add something on this part of code

echo "<img border=0 width=0px height=2px src='conf/i/".$foto[$i]."'>";



$dataku.="'".$foto[$i]."': { thumbnail: 'thumb/".$foto[$i]."'},";
}
else
{


http://img543.imageshack.us/img543/6530/thumbjtb.jpg
you see the thumbnail pics have different size,
i want to set all the thumbnail pics to 100 x 67



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum