CWIS Developer Documentation
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Image Class Reference

Public Member Functions

 __construct ($SourceFileName, $DebugLevel=0)
 
 SaveAs ($FileName, $NewImageType=NULL)
 
 XSize ()
 
 YSize ()
 
 ScaleTo ($ScaledXSize, $ScaledYSize, $MaintainAspectRatio=FALSE)
 
 CropTo ($CroppedXSize, $CroppedYSize, $CroppedXOrigin=0, $CroppedYOrigin=0)
 
 Type ($FileName=NULL)
 Get the image type. More...
 
 Mimetype ()
 Get the MIME type for the image. More...
 
 Extension ()
 
 JpegQuality ($NewSetting=NULL)
 
 Status ()
 
 FailedExternalCommand ()
 
 ReadSize ()
 
 ImageFormatSupportedByPhp ($Format=NULL)
 

Static Public Member Functions

static ExtensionForType ($Type)
 return the file name extension for the image, given a type. More...
 
static SupportedFormats ()
 
static SupportedFormatNames ()
 

Public Attributes

const IMGTYPE_UNKNOWN = 0
 
const IMGTYPE_JPEG = 1
 
const IMGTYPE_GIF = 2
 
const IMGTYPE_BMP = 4
 
const IMGTYPE_PNG = 8
 
 $GDVersion
 
 $ImageObj
 
 $SourceFileName
 
 $ImageXSize
 
 $ImageYSize
 
 $ScaledXSize
 
 $ScaledYSize
 
 $MaintainAspectRatio
 
 $CroppedXSize
 
 $CroppedYSize
 
 $CroppedXOrigin
 
 $CroppedYOrigin
 
 $JpegSaveQuality
 
 $DecodeCommand
 
 $ErrorStatus
 
 $FailedCommand
 
 $DebugLevel
 

Detailed Description

Definition at line 15 of file Image.php.

Constructor & Destructor Documentation

Image::__construct (   $SourceFileName,
  $DebugLevel = 0 
)

Member Function Documentation

Image::CropTo (   $CroppedXSize,
  $CroppedYSize,
  $CroppedXOrigin = 0,
  $CroppedYOrigin = 0 
)

Definition at line 285 of file Image.php.

References $CroppedXOrigin, $CroppedXSize, $CroppedYOrigin, and $CroppedYSize.

Image::Extension ( )

Definition at line 368 of file Image.php.

References Type().

static Image::ExtensionForType (   $Type)
static

return the file name extension for the image, given a type.

Parameters
int$Typetype of file extension
Returns
string|NULL Image file name extension, or NULL if invalid or unsupported image type.

Definition at line 379 of file Image.php.

Referenced by SPTImage\FieldId(), SPTImage\GetImageUrlForResource(), and Image_Test\testAll().

Here is the caller graph for this function:

Image::FailedExternalCommand ( )

Definition at line 467 of file Image.php.

References $FailedCommand.

Image::ImageFormatSupportedByPhp (   $Format = NULL)

Definition at line 512 of file Image.php.

References Type().

Referenced by __construct(), and SaveAs().

Here is the caller graph for this function:

Image::JpegQuality (   $NewSetting = NULL)

Definition at line 392 of file Image.php.

References $JpegSaveQuality.

Image::Mimetype ( )

Get the MIME type for the image.

Returns
Returns the MIME type for the image, or FALSE if unable to determine the MIME type.

Definition at line 330 of file Image.php.

References $SourceFileName, and Type().

Image::ReadSize ( )

Definition at line 501 of file Image.php.

Referenced by XSize(), and YSize().

Here is the caller graph for this function:

Image::SaveAs (   $FileName,
  $NewImageType = NULL 
)
Image::ScaleTo (   $ScaledXSize,
  $ScaledYSize,
  $MaintainAspectRatio = FALSE 
)

Definition at line 276 of file Image.php.

References $MaintainAspectRatio, $ScaledXSize, and $ScaledYSize.

Image::Status ( )

Definition at line 461 of file Image.php.

References $ErrorStatus.

Referenced by SPTImage\FieldId().

Here is the caller graph for this function:

static Image::SupportedFormatNames ( )
static

Definition at line 437 of file Image.php.

References SupportedFormats().

Referenced by Image_Test\testAll().

Here is the caller graph for this function:

static Image::SupportedFormats ( )
static

Definition at line 399 of file Image.php.

Referenced by SupportedFormatNames(), and Image_Test\testAll().

Here is the caller graph for this function:

Image::Type (   $FileName = NULL)

Get the image type.

If image file does not exist, the file name is examined to try to determine the image type.

Parameters
string$FileNameFull name (with path) of image file. (OPTIONAL, defaults to previously-stored file name for this object)
Returns
enum Image type.

Definition at line 301 of file Image.php.

References $SourceFileName.

Referenced by __construct(), Extension(), ImageFormatSupportedByPhp(), Mimetype(), and SaveAs().

Here is the caller graph for this function:

Image::XSize ( )

Definition at line 262 of file Image.php.

References $ImageXSize, and ReadSize().

Referenced by SaveAs().

Here is the caller graph for this function:

Image::YSize ( )

Definition at line 269 of file Image.php.

References $ImageYSize, and ReadSize().

Referenced by SaveAs().

Here is the caller graph for this function:

Member Data Documentation

Image::$CroppedXOrigin

Definition at line 485 of file Image.php.

Referenced by CropTo().

Image::$CroppedXSize

Definition at line 483 of file Image.php.

Referenced by CropTo(), and SaveAs().

Image::$CroppedYOrigin

Definition at line 486 of file Image.php.

Referenced by CropTo().

Image::$CroppedYSize

Definition at line 484 of file Image.php.

Referenced by CropTo(), and SaveAs().

Image::$DebugLevel

Definition at line 491 of file Image.php.

Referenced by __construct().

Image::$DecodeCommand

Definition at line 488 of file Image.php.

Image::$ErrorStatus

Definition at line 489 of file Image.php.

Referenced by SaveAs(), and Status().

Image::$FailedCommand

Definition at line 490 of file Image.php.

Referenced by FailedExternalCommand().

Image::$GDVersion

Definition at line 475 of file Image.php.

Image::$ImageObj

Definition at line 476 of file Image.php.

Referenced by SaveAs().

Image::$ImageXSize

Definition at line 478 of file Image.php.

Referenced by XSize().

Image::$ImageYSize

Definition at line 479 of file Image.php.

Referenced by YSize().

Image::$JpegSaveQuality

Definition at line 487 of file Image.php.

Referenced by JpegQuality().

Image::$MaintainAspectRatio

Definition at line 482 of file Image.php.

Referenced by ScaleTo().

Image::$ScaledXSize

Definition at line 480 of file Image.php.

Referenced by SaveAs(), and ScaleTo().

Image::$ScaledYSize

Definition at line 481 of file Image.php.

Referenced by SaveAs(), and ScaleTo().

Image::$SourceFileName

Definition at line 477 of file Image.php.

Referenced by __construct(), Mimetype(), and Type().

const Image::IMGTYPE_BMP = 4

Definition at line 24 of file Image.php.

Referenced by Image_Test\testAll().

const Image::IMGTYPE_GIF = 2

Definition at line 23 of file Image.php.

Referenced by Image_Test\testAll().

const Image::IMGTYPE_JPEG = 1

Definition at line 22 of file Image.php.

Referenced by Image_Test\testAll().

const Image::IMGTYPE_PNG = 8

Definition at line 25 of file Image.php.

Referenced by Image_Test\testAll().

const Image::IMGTYPE_UNKNOWN = 0

Definition at line 21 of file Image.php.

Referenced by Image_Test\testAll().


The documentation for this class was generated from the following file: