PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Himanshu Patel   Image Resizing Class   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: This is example ready for running
Class: Image Resizing Class
Resize images preserving the aspect ratio
Author: By
Last change:
Date: 16 years ago
Size: 424 bytes
 

Contents

Class file image Download
<?PHP
//include class file
require('class.image-resize.php');
$obj = new img_opt();
// set maximum width within wich the image should be resized
$obj->max_width(500);
// set maximum height within wich the image should be resized
// for example size of the area in which image to be displayed
$obj->max_height(500);
$obj->image_path('example.jpg');
// call the functio to resize the image
$obj->image_resize();
?>