Cheetah
Functions | Variables
images.inc.php File Reference

Go to the source code of this file.

Functions

 imageResize ( $srcFilename, $dstFilename, $sizeX, $sizeY, $forceJPGOutput=false, $isSquare=false)
 
 applyWatermark ( $srcFilename, $dstFilename, $wtrFilename, $wtrTransparency)
 

Variables

 $gdInstalled = extension_loaded( 'gd' )
 
 $use_gd = getParam( 'enable_gd' ) == 'on' ? 1 : 0
 

Function Documentation

◆ applyWatermark()

applyWatermark (   $srcFilename,
  $dstFilename,
  $wtrFilename,
  $wtrTransparency 
)

Applies watermark to image given in $srcFilename with specified opacity and saves result to $dstFilename

Parameters
string$srcFilename- source image filename
string$dstFilename- destination image filename
string$wtrFilename- watermark filename
int$wtrTransparency- watermark transparency (from 0 to 100)
Returns
int - zero on success, non-zero on fail

NOTE: Source image should be in GIF, JPEG or PNG format NOTE: if $wtrTransparency = 0 then no action will be done with source image but if $wtrTransparency = 100 then watermark will fully override source image

Definition at line 58 of file images.inc.php.

◆ imageResize()

imageResize (   $srcFilename,
  $dstFilename,
  $sizeX,
  $sizeY,
  $forceJPGOutput = false,
  $isSquare = false 
)

Resizes image given in $srcFilename to dimensions specified with $sizeX x $sizeY and saves it to $dstFilename

Parameters
string$srcFilename- source image filename
string$dstFilename- destination image filename
int$sizeX- width of destination image
int$sizeY- height of destination image
bool$forceJPGOutput- always make result in JPG format
Returns
int - zero on success, non-zero on fail

Definition at line 29 of file images.inc.php.

Variable Documentation

◆ $gdInstalled

$gdInstalled = extension_loaded( 'gd' )

Definition at line 14 of file images.inc.php.

◆ $use_gd

$use_gd = getParam( 'enable_gd' ) == 'on' ? 1 : 0

Definition at line 15 of file images.inc.php.