PHP Classes

File: example.resizebypercent.php

Recommend this page to a friend!
  Classes of Mattias Pfeiffer  >  imgresize  >  example.resizebypercent.php  >  Download  
File: example.resizebypercent.php
Role: Example script
Content type: text/plain
Description: This example shows how to resize using the resizebypercent() function
Class: imgresize
Class for resizing using imagemagick
Author: By
Last change:
Date: 20 years ago
Size: 616 bytes


Class file image Download
include_once("class.imgresize.php"); // include our class

        imgresize() class example.
        Resize image named 'moose.jpg'. Percent: 70%

// set our header to image/jpeg for output
header("Content-Type: image/jpeg");

// create our class
$img = new imgresize();

// load our image

// resize our image by 70 percent

// saves our resized image as 'thumb_moose.jpg'. if the file exists, we'll overwrite.

// dump our resized image to the browser


For more information send a message to info at phpclasses dot org.