class CImageHelper


Located at : UKNOWVA_ROOT/components/com_community/helpers/image.php

Methods

static 
resize($srcPath, $destPath, $destType, $destWidth, $destHeight, $sourceX, $sourceY, $currentWidth, $currentHeight)

No description

static 
resizeProportional($srcPath, $destPath, $destType, $destWidth, $destHeight)

No description

static bool
createThumb($srcPath, $destPath, $destType, $destWidth = 64, $destHeight = 64)

Method to create a thumbnail for an image

static 
getExtension($type)

No description

static 
isValidType($type)

No description

isMemoryNeededExceed($filename)

No description

isValid($file)

No description

static 
open($file, $type)

No description

static 
getSize($source)

No description

static 
resizeAspectRatio($source, $destination, $thumb_width, $thumb_height)

No description

static 
rotate($srcPath, $destPath, $degrees)

Rotate the source image and store it to dest path Return true if successful and false otherwise

static 
rotatePNGImage($image)

Rotate png image by 90 degree

static 
getOrientation($srcPath)

Detect image Orientation. Return false if not found

static bool
addWatermark($backgroundImagePath, $destinationPath, $destinationType, $watermarkImagePath, $positionX, $positionY, $deleteBackgroundImage = true)

Method to add watermark on existing image.

static 
getPositions($location, $imageWidth, $imageHeight, $watermarkWidth, $watermarkHeight)

Retrieve the proper x and y position depending on the user's choice of the watermark position.

static 
getHashName(string $data)

Retrieves the appropriate image file name which is already hashed.

Details

at line 23
static resize($srcPath, $destPath, $destType, $destWidth, $destHeight, $sourceX, $sourceY, $currentWidth, $currentHeight)

Parameters

$srcPath
$destPath
$destType
$destWidth
$destHeight
$sourceX
$sourceY
$currentWidth
$currentHeight

at line 132
static resizeProportional($srcPath, $destPath, $destType, $destWidth, $destHeight)

Parameters

$srcPath
$destPath
$destType
$destWidth
$destHeight

at line 214
static bool createThumb($srcPath, $destPath, $destType, $destWidth = 64, $destHeight = 64)

Method to create a thumbnail for an image

Parameters

$srcPath The original source of the image.
$destPath The destination path for the image
$destType The destination image type.
$destWidth The width of the thumbnail.
$destHeight The height of the thumbnail.

Return Value

bool True on success.

at line 292
static getExtension($type)

Parameters

$type

at line 309
static isValidType($type)

Parameters

$type

at line 317
isMemoryNeededExceed($filename)

Parameters

$filename

at line 345
isValid($file)

Parameters

$file

at line 455
static open($file, $type)

Parameters

$file
$type

at line 521
static getSize($source)

Parameters

$source

at line 531
static resizeAspectRatio($source, $destination, $thumb_width, $thumb_height)

Parameters

$source
$destination
$thumb_width
$thumb_height

at line 569
static rotate($srcPath, $destPath, $degrees)

Rotate the source image and store it to dest path Return true if successful and false otherwise

Parameters

$srcPath
$destPath
$degrees

at line 664
static rotatePNGImage($image)

Rotate png image by 90 degree

Parameters

$image

at line 683
static getOrientation($srcPath)

Detect image Orientation. Return false if not found

Parameters

$srcPath

at line 718
static bool addWatermark($backgroundImagePath, $destinationPath, $destinationType, $watermarkImagePath, $positionX, $positionY, $deleteBackgroundImage = true)

Method to add watermark on existing image.

Parameters

$backgroundImagePath
$destinationPath
$destinationType
$watermarkImagePath
$positionX
$positionY
$deleteBackgroundImage

Return Value

bool True on sucess.

at line 778
static getPositions($location, $imageWidth, $imageHeight, $watermarkWidth, $watermarkHeight)

Retrieve the proper x and y position depending on the user's choice of the watermark position.

Parameters

$location
$imageWidth
$imageHeight
$watermarkWidth
$watermarkHeight

at line 811
static getHashName(string $data)

Retrieves the appropriate image file name which is already hashed.

Parameters

string $data A unique data to be hashed