Login   Register  
PHP Classes
elePHPant
Icontem

File: example

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Aneesh R  >  Thumbnail Creation  >  example  >  Download  
File: example
Role: Example script
Content type: text/plain
Description: Use this example to get an idea
Class: Thumbnail Creation
Calculate image thumbnails dimensions
Author: By
Last change:
Date: 7 years ago
Size: 1,648 bytes
 

Contents

Class file image Download
<?php
require_once('thumbnail.class.php');
$image_dir    ='../Images/';

?>
<table width="100%" border="0">
  <tr> 
    <td> 
      <?php
                $Image1    
=    getimagesize('../Images/css1.png');  
                
$t1    =    new Thumbnail($Image1[0],$Image1[1]);
                
$t1->ResizeImage();
        
?>
      <img src="../Images/css1.png"  width="<?php echo $t1->New_Width;?>" height="<?php echo $t1->New_Height;?>"> 
    </td>
  </tr>
  <tr> 
    <?php
                $Image2    
=    getimagesize('../Images/jobs-india.gif');  
                
$t2    =    new Thumbnail($Image2[0],$Image2[1]);
                
$t2->ResizeImage();
        
?>
    <td><img src="../Images/jobs-india.gif" width="<?php echo $t2->New_Width;?>" height="<?php echo $t2->New_Height;?>"></td>
  </tr>
  <tr> 
    <?php
                $Image3    
=    getimagesize('../Images/pic08510.jpg');  
                
$t3    =    new Thumbnail($Image3[0],$Image3[1]);
                
$t3->ResizeImage();
        
?>
    <td><img src="../Images/pic08510.jpg" width="<?php echo $t3->New_Width;?>" height="<?php echo $t3->New_Height;?>"></td>
  </tr>
  <tr> 
    <?php
                $Image4    
=    getimagesize('../Images/pic08510.jpg');  
                
$t4    =    new Thumbnail($Image4[0],$Image4[1]);
                
$t4->ResizeImage();
        
?>
    <td><img src="../Images/pic16273.jpg" width="<?php echo $t4->New_Width;?>" height="<?php echo $t4->New_Height;?>"></td>
  </tr>
  <tr> 
    <?php
                $Image5    
=    getimagesize('../Images/73957.jpg');  
                
$t5    =    new Thumbnail($Image5[0],$Image5[1]);
                
$t5->ResizeImage();
        
?>
    <td><img src="../Images/73957.jpg" width="<?php echo $t5->New_Width;?>" height="<?php echo $t5->New_Height;?>"></td>
  </tr>
</table>