PHP Classes

File: example_with_explanations.php

Recommend this page to a friend!
  Classes of Drazen  >  Thumb-nailit  >  example_with_explanations.php  >  Download  
File: example_with_explanations.php
Role: Example script
Content type: text/plain
Description: Example with explanations
Class: Thumb-nailit
Generate size limited thumbnails of a given image
Author: By
Last change:
Date: 12 years ago
Size: 1,155 bytes


Class file image Download

// name (and path) of the original image that you want to resize (don't forget the path)

// name you want to give to the thumbnail (again - don't forget the path)

// Wanted size - only the HIGHER value needs to be entered.
//Let's say you have an image that is 1000 x 500 pixels and you need a thumbnail that is 100x50 pixels wide.
//All you enter into "wanted size" is 100. Class will calculate by itself what is the other number (50 in this case).
//Code checks if the image is vertically or horizontally oriented, and applies the "wanted size" to the higher value
//(width if the image is horizontal / height if the image is vertical).


// Report - tells the class whether or not to display the progress report
// 1 if you want to display the image data (old file size and pixels, new file size and pixels etc...)
// 0 if you don't want any text to be displayed - just silent thumbnailing.

$resizer=new thumbnailit;