PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Ondra Rafaj   Fuerte Image Tool   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example script
Class: Fuerte Image Tool
Perform image manipulation operations
Author: By
Last change:
Date: 15 years ago
Size: 775 bytes


Class file image Download
// Using of resize class


$new_width = 100;
$new_height = 100;

// new instance of class
$img = new images('image.jpg');

//create image from form
//$img = new images($_FILES['image'], 'upload');

// create image from string
//$img = new images($string, 'string');

// resizing image (constrain proportions)
$img->resize($new_width, $new_height);

// resizing image (use strictly setted params)
//$img->resize($new_height, $new_height, 'strict');

//saving image

// if you want another type of image
//$img->save('image.png', 'png');
//$img->save('image.gif', 'gif');

// clearing the memory

// check error output
$errors = $img->getErrors();