PHP Classes

File: example-09.php

Recommend this page to a friend!
  Classes of Krzysztof Kardasz   Nweb Image   example-09.php   Download  
File: example-09.php
Role: Example script
Content type: text/plain
Description: Example
Class: Nweb Image
Perform several image manipulation operations
Author: By
Last change:
Date: 17 years ago
Size: 1,232 bytes
 

Contents

Class file image Download
<?php
/**
 * Nweb Extension Script
 *
 * Example
 *
 * @category Nweb
 * @package Nweb_Scripts
 * @author Krzysztof Kardasz
 * @copyright Copyright (c) euo.pl
 */


   
include 'lib/Image.php';
    include
'lib/ImageException.php';
try {

   
$obj = new Image('photos/image-03.jpg');
   
$obj->open();

   
# Wpisanie tekstu w obrazek
    # Text (Image $Image = null, $text = null, $font, $Border = 1, $Background = '#000000', $FontColor = '#FFFFFF', $position = self::BOTTOM, $Space = 3, $Separator = ' ', $Size = 'KB')

    # Examples:
    //$obj->Text (null, 'ZDJECIE TESTOWE', 'terminal6.gdf');
    // $obj->Text (null, array(Image::Resolution, 'ZDJECIE TESTOWE'), 'terminal6.gdf');
    // $obj->Text (null, array(Image::Size, 'ZDJECIE TESTOWE'), 'terminal6.gdf');
    // $obj->Text (null, array('ZDJECIE TESTOWE', Image::Size . Image::Resolution), 'terminal6.gdf');
   
$obj->Text (null, array('ZACHOD SLONCA - PRZYKLADOWE ZDJECIE', Image::Resolution . Image::Size), 'terminal6.gdf');

   
# Wyświetlenie zdjęcia
   
$obj->Display();

   
# Wyczyszczenie pamięci przydzielonej dla zdjęcia
   
$obj->ImageClear();
}
catch (
ImageException $e)
{
    echo
$e->Message();
}
?>