Login   Register  
PHP Classes
elePHPant
Icontem

File: example_2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Martin Theimer  >  Image_Toolbox  >  example_2.php  >  Download  
File: example_2.php
Role: Example script
Content type: text/plain
Description: example 2: simple thumbnail generation
Class: Image_Toolbox
Image manipulation class
Author: By
Last change:
Date: 2003-11-04 22:13
Size: 570 bytes
 

Contents

Class file image Download
<?php
/* example_2.php - Example for the Image_Toolbox class
 *
 * loads a jpeg picturefile from disk, resizes it to a
 * new width of 100 pixels while preserving the correct
 * aspectratio of the original picture (new height will be
 * calculated) and saves it as a new thumbnail picture
 * in png format. (8-bit png)
 *
 * @author Martin Theimer <pappkamerad@decoded.net>
 */
require_once ('Image_Toolbox.class.php');

$img = new Image_Toolbox('pictures/mybabe_01.jpg');
$img->newOutputSize(1000);
$img->save('thumbs/thumb-mybabe_01.png''png8');
?>