<?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_1 = new Image('photos/image-01.jpg');
$obj_1->open();
$obj_2 = new Image('photos/image-01.jpg');
$obj_2->open();
$obj_2->ResizeToWidth(200);
# 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_2->Text ($obj_1, array('KLIKNIJ ZEBY POWIEKSZYC', Image::Resolution . Image::Size), 'terminal6.gdf');
# Wyświetlenie zdjęcia
$obj_2->Display();
# Wyczyszczenie pamięci przydzielonej dla zdjęcia
$obj_1->ImageClear();
$obj_2->ImageClear();
}
catch (ImageException $e)
{
echo $e->Message();
}
?>
|