PHP Classes

File: imgsupport.php

Recommend this page to a friend!
  Classes of Patrick Teague   Image2Thumbnail 1.0a   imgsupport.php   Download  
File: imgsupport.php
Role: Auxiliary script
Content type: text/plain
Description: check image format support on server
Class: Image2Thumbnail 1.0a
Create thumbnails from GIF, JPG, or PNG on the fly
Author: By
Last change:
Date: 21 years ago
Size: 4,331 bytes
 

Contents

Class file image Download
<?php

print "<pre>";

/*
* 1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF,
* 5 = PSD, 6 = BMP,
* 7 = TIFF(intel byte order),
* 8 = TIFF(motorola byte order),
* 9 = JPC, 10 = JP2, 11 = JPX,
* 12 = JB2, 13 = SWC, 14 = IFF
*/

print "GIF SUPPORT\n";
$img = "gif";
    if(
function_exists("image".$img) )
    {
        print(
"image$img() function supported\n" );
    }
    else
    {
        print(
"image$img() function is not supported\n" );
    }
    if(
function_exists("imagecreatefrom".$img) )
    {
        print(
"imagecreatefrom$img() function supported\n" );
    }
    else
    {
        print(
"imagecreatefrom$img() function is not supported\n" );
    }


print
"\nJPEG SUPPORT\n";
$img = "jpeg";
    if(
function_exists("image".$img) )
    {
        print(
"image$img() function supported\n" );
    }
    else
    {
        print(
"image$img() function is not supported\n" );
    }
    if(
function_exists("imagecreatefrom".$img) )
    {
        print(
"imagecreatefrom$img() function supported\n" );
    }
    else
    {
        print(
"imagecreatefrom$img() function is not supported\n" );
    }


print
"\nPNG SUPPORT\n";
$img = "png";
    if(
function_exists("image".$img) )
    {
        print(
"image$img() function supported\n" );
    }
    else
    {
        print(
"image$img() function is not supported\n" );
    }
    if(
function_exists("imagecreatefrom".$img) )
    {
        print(
"imagecreatefrom$img() function supported\n" );
    }
    else
    {
        print(
"imagecreatefrom$img() function is not supported\n" );
    }


print
"\nSTRING SUPPORT\n";
$img = "string";
    if(
function_exists("image".$img) )
    {
        print(
"image$img() function supported\n" );
    }
    else
    {
        print(
"image$img() function is not supported\n" );
    }
    if(
function_exists("imagecreatefrom".$img) )
    {
        print(
"imagecreatefrom$img() function supported\n" );
    }
    else
    {
        print(
"imagecreatefrom$img() function is not supported\n" );
    }


print
"\nWBMP SUPPORT\n";
$img = "wbmp";
    if(
function_exists("image".$img) )
    {
        print(
"image$img() function supported\n" );
    }
    else
    {
        print(
"image$img() function is not supported\n" );
    }
    if(
function_exists("imagecreatefrom".$img) )
    {
        print(
"imagecreatefrom$img() function supported\n" );
    }
    else
    {
        print(
"imagecreatefrom$img() function is not supported\n" );
    }


print
"\nXBM SUPPORT\n";
$img = "xbm";
    if(
function_exists("image".$img) )
    {
        print(
"image$img() function supported\n" );
    }
    else
    {
        print(
"image$img() function is not supported\n" );
    }
    if(
function_exists("imagecreatefrom".$img) )
    {
        print(
"imagecreatefrom$img() function supported\n" );
    }
    else
    {
        print(
"imagecreatefrom$img() function is not supported\n" );
    }


print
"\nGD2 SUPPORT\n";
$img = "gd2";
    if(
function_exists("image".$img) )
    {
        print(
"image$img() function supported\n" );
    }
    else
    {
        print(
"image$img() function is not supported\n" );
    }
    if(
function_exists("imagecreatefrom".$img) )
    {
        print(
"imagecreatefrom$img() function supported\n" );
    }
    else
    {
        print(
"imagecreatefrom$img() function is not supported\n" );
    }


print
"\nGD2PART SUPPORT\n";
$img = "gd2part";
    if(
function_exists("image".$img) )
    {
        print(
"image$img() function supported\n" );
    }
    else
    {
        print(
"image$img() function is not supported\n" );
    }
    if(
function_exists("imagecreatefrom".$img) )
    {
        print(
"imagecreatefrom$img() function supported\n" );
    }
    else
    {
        print(
"imagecreatefrom$img() function is not supported\n" );
    }


print
"\nGD SUPPORT\n";
$img = "gd";
    if(
function_exists("image".$img) )
    {
        print(
"image$img() function supported\n" );
    }
    else
    {
        print(
"image$img() function is not supported\n" );
    }
    if(
function_exists("imagecreatefrom".$img) )
    {
        print(
"imagecreatefrom$img() function supported\n" );
    }
    else
    {
        print(
"imagecreatefrom$img() function is not supported\n" );
    }


print
"\nXPM SUPPORT\n";
$img = "xpm";
    if(
function_exists("image".$img) )
    {
        print(
"image$img() function supported\n" );
    }
    else
    {
        print(
"image$img() function is not supported\n" );
    }
    if(
function_exists("imagecreatefrom".$img) )
    {
        print(
"imagecreatefrom$img() function supported\n" );
    }
    else
    {
        print(
"imagecreatefrom$img() function is not supported\n" );
    }


print_r( gd_info() );

print
"</pre>";


?>