PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 6 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 );
}
?>