PHP Classes

File: example-11.php

Recommend this page to a friend!
  Classes of Krzysztof Kardasz   Nweb Image   example-11.php   Download  
File: example-11.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: 868 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-01.jpg');
   
$obj->open();

   
# Skala szarośći
   
$obj->GrayScale();

   
# Rozjaśnianie zakres: -255 do 255
   // $obj->Brightness(-70);

    # Negatyw
  // $obj->Negative();

    # Kontrast zakres: -100 do 100
  // $obj->Contrast(-50);

    # Kolorowanie (RGB) Colorize($Red = 0, $Green = 0, $Blue = 0)
    //$obj->Colorize(51, -50, 50);

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

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