PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Vincenzo Visciano   OOimage   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Little example
Class: OOimage
Manage an image like an object.
Author: By
Last change:
Date: 22 years ago
Size: 872 bytes
 

Contents

Class file image Download
<?php

include ('OOimage.inc.php');
   
$imm = new OOimage('image.jpg', '/foto');
   
       
if (
$imm->ExistImage()) {
    echo
"<p>image name : " . $imm->GetImageName() . "</p>\n";
    echo
"<p>image height : " . $imm->GetimageHeight() . "</p>\n";
    echo
"<p>image whidth : " . $imm->GetimageWidth() . "</p>\n";
    echo
"<p>image path : " . $imm->GetimagePath() . "</p>\n";
    echo
"<p>image whidth : " . $imm->GetimageSize() . "</p>\n";
    echo
"<p>image dimension : " . $imm->GetimageDimension() . "</p>\n";
    echo
"<p>image type : " . $imm->GetimageType() . "</p>\n";
    if (
$imm->ExistThumb()) {
        echo
"<p>Existent thumb : ". $imm->GetThumbName() . "</p><br>";
    } else {
       
$imm->MakeThumb();
        if (
$imm->ExistThumb())
            echo
"<p>Created thumb : ". $imm->GetThumbName() . "</p><br>";
    }
    echo
$imm->HtmlThumbImage();
} else {
echo
"<p>Do not exist!</p>";
}

?>