jImageModifier

Utility class to manipulate image

package

jelix

subpackage

utils

static

Methods

compute path from the configuration or from the given array. These paths will be used to read images and to save them into a cache directory.

computeUrlFilePath( $config = null,  $src = null) : \array.
static

Arguments

$config

$src

Response

\array.

keys are src_url, src_path, cache_path, cache_url

create a shadow

createShadow( $image, array $params) : resource
static

Arguments

$image

$params

array

parameters for the url

Response

resource

the image with shadow

retrieve an image from the combination of a source image and parameters

get(string $src, array $params = array(),  $sendCachePath = true, array $config = null) : array
static

parameters list some induce transformations, some not

class :string id :string alt :string width :uint height :uint maxwidth :uint only with maxheight maxheight :uint only with maxwidth zoom 1-100 omo :boolean alignh [left|center|right|:int] alignv [top|center|bottom|:int] ext [png|jpg|gif] quality 0-100 if ext = jpg shadow :boolean soffset :uint sangle :uint sblur :uint sopacity :uint scolor #000000 :string background #000000 :string

gif -> image/gif jpeg -> image/jpeg jpg -> image/jpeg jpe -> image/jpeg xpm -> image/x-xpixmap xbm -> image/x-xbitmap wbmp -> image/vnd.wap.wbmp png -> image/png other -> image/png

Arguments

$src

string

the path to the source image, relative to the www directory or relative to the path indicated into the configuration. The filename should have one of these extensions: gif,jpeg,jpg,jpe,xpm,xbm,wbmp,png

$params

array

parameters specifying image

$sendCachePath

$config

array

the paths configuration. should contain same parameters as you find in the imagemodifier section of the configuration. give these array if you want to override the configuration.

Response

array

list of attributes

transform source image file (given parameters) and store the result into an other file

transformImage(string $srcFs, string $targetPath, string $targetName, array $params) 
static

Arguments

$srcFs

string

the path to the image to transform. [gif|jpeg|jpg|jpe|xpm|xbm|wbmp|png]

$targetPath

string

the path of the directory to store the resulting image

$targetName

string

the filename of the resulting image

$params

array

parameters specifying transformations

Properties

params inducing transforms of source image

transformParams : array
static
var

Type(s)

array

params associated with html equivalent attributes do not induce any transform of source image

attributeParams : array
static
var

Type(s)

array

mimes

mimes : 
static

Type(s)