Login   Register  
PHP Classes

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ciprian Voicu  >  Pictoru's Thumb  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: the example file
Class: Pictoru's Thumb
Generate thumbnails to GIF, JPEG and PNG images
Author: By
Last change: add an example and of rotation for the last function added
Date: 8 years ago
Size: 1,582 bytes


Class file image Download
*    Name:            Pictoru's Thumb                                                *
*    Author:            Ciprian Voicu                                                *
*    Version:         1.0                                                         *
*    Date:            2006-08-08                                                    *
*    Description:     creates, saves, outputs thumbs                            *
*    License:         GNU GPL                                                        *

include "class.pThumb.php";

$img=new pThumb();

# sets the max width of thumb to 200

# sets the max height of thumb to 150

# sets the max width and max height of thumb

# set quality of the output image if jpeg

# all of them will be overwrited by this function if more than 1 parameter is call
# pCreate(image path, max width, max height, quality)
# max width, max height, quality are optional
# if no image present will be drawn one

# this class rotate the image
# the second parameter is optional. specifies the direction of rotation
# the default is CW. you can set it to CCW either
# ot you can use 1 instead of CW and 2 instead of CCW
# the third parameter is optional. specifies the color of the uncovered zone after the rotation. 

# save the image
# if the directory is not present will be created

# send the image to browser
# the argument is set to false will promt to download
# ex: $img->pOutput(false);