PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Juraj Puchký   Simple Image   sample.php   Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample script
Class: Simple Image
Resize images preserving the original proportions
Author: By
Last change:
Date: 10 years ago
Size: 525 bytes
 

Contents

Class file image Download
<?php

/**
 * SimpleImage sample
 * @description Class to manipulate with images
 * @version 1.0.0
 * @copyright (c) 2013 Juraj Puchký - Devtech
 * @license GPLv3
 * @autor Juraj Puchký - Devtech <sjurajpuchky@seznam.cz>
 *
 */

include_once 'SimpleImage.php';
$image = SimpleImage::load('http://files.phpclasses.org/graphics/phpclasses/elephpant.png');
$resizedImage = SimpleImage::resizeToHeight ( $image, 30 );
SimpleImage::save ( $resizedImage, "resized.png" );

unset(
$image);
unset(
$resizedImage);