PHP Classes

File: r-image.php

Recommend this page to a friend!
  Classes of Alexandr   cThumbnail   r-image.php   Download  
File: r-image.php
Role: Example script
Content type: text/plain
Description: example php
Class: cThumbnail
Generate thumbnails from image files
Author: By
Last change:
Date: 16 years ago
Size: 355 bytes
 

Contents

Class file image Download
<?
   
require_once("thumbnail.php");

    if (
$_GET['color'])
    {
       
$bg = "0x" . substr($_GET['color'], 0, 6);
        eval(
"\$bg = " . $bg . ";");
       
$thumb = new cThumbnail($_GET['file'], $_GET['w'], $_GET['h'], $bg);
    }
    else
       
$thumb = new cThumbnail($_GET['file'], $_GET['w'], $_GET['h']);
   
   
$thumb->setType('image/jpeg');

   
$thumb->output();

?>