Login   Register  
PHP Classes
elePHPant
Icontem

File: image.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of László Zsidi  >  Easy Resize Image  >  image.php  >  Download  
File: image.php
Role: Example script
Content type: text/plain
Description: Image generator
Class: Easy Resize Image
Resize images keeping the aspect ratio
Author: By
Last change:
Date: 5 years ago
Size: 560 bytes
 

Contents

Class file image Download
<?php
/*
 *
 *    => Example Start
 *
 */
include "resizeImage.class.php";
/*
 *
 *    => Class constructor
 *
 */
$resizeimage = new resizeImage;
/*
 *
 *    => Add image path and new thumb size
 *
 */
$image $resizeimage -> process "foto.jpg", isset ( $_GET 'thumb' ] ) ? $_GET 'thumb' ] : 90 );
/*
 *
 *    => Set image header
 *
 */
header 'Content-type:image/jpeg' );
/*
 *
 *    => Create image
 *
 */
imageJpeg $image );
/*
 *
 *    => Destroy image
 *
 */
imageDestroy $image );
/*
 *
 *    => Example End
 *
 */
?>