PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of László Zsidi   GD Source   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: GD Source
Create multiple GD image resources from images
Author: By
Last change:
Date: 15 years ago
Size: 494 bytes
 

Contents

Class file image Download
<?php
include "GDSource.class.php";

$images = Array ( "source.jpg", "source.gif", "source.png" );

$gdsource = new GDSource ( $images, "url" );
$image = $gdsource -> GetID ( );

if (
is_array ( $image ) ) {
    foreach (
$image as $im ) {
       
printf ( "The image dimensions: %d x %d<br />", imageSx ( $im ), imageSy ( $im ) );
       
imageDestroy ( $im );
    }
}
else {
   
printf ( "The image dimensions: %d x %d", imageSx ( $image ), imageSy ( $image ) );
   
imageDestroy ( $image );
}
?>