clearFusionCMS 3.0.0
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • clearFusionCMS
    • module
      • cloudflare
      • comments
      • content
      • forms
      • members
      • search
  • fusionLib
  • None

Classes

  • _flFormGroup
  • _flUtf8Base
  • flAcMgr
  • flApiDbInstaller
  • flApiKeyMgr
  • flApiServer
  • flApiService
  • flApp
  • flAuthTOTP
  • flBufferCode
  • flBufferCss
  • flBufferJs
  • flCache
  • flCacheAPC
  • flCacheDb
  • flCacheDbInstaller
  • flCacheDummy
  • flCacheFile
  • flCacheFunction
  • flCacheMemcache
  • flCacheMemcached
  • flCacheOutput
  • flCacheRedis
  • flCacheSqlite
  • flConfig
  • flConfigDb
  • flConfigDbInstaller
  • flConfigFile
  • flConfigIni
  • flController
  • flControllerAction
  • flDate
  • flDateTzMenu
  • flDb
  • flDbInstaller
  • flDbInstallerInterface
  • flDbMySQL
  • flDbMySQLi
  • flDbMySQLiResult
  • flDbMySQLResult
  • flDbNestedSet
  • flDbResult
  • flDbSQLite
  • flDbSQLite3
  • flDbSQLite3Result
  • flDbSQLiteResult
  • flEmail
  • flEvent
  • flEventDbInstaller
  • flEventManager
  • flExceptionErrorController
  • flExceptionReporter
  • flForm
  • flFormBuilder
  • flFormDecorator
  • flFormDecoratorDl
  • flFormDecoratorDtDd
  • flFormDecoratorFieldset
  • flFormDecoratorForm
  • flFormDecoratorLi
  • flFormDecoratorList
  • flFormDecoratorUl
  • flFormElement
  • flFormElementButton
  • flFormElementCheckbox
  • flFormElementChecklist
  • flFormElementEmail
  • flFormElementFile
  • flFormElementHidden
  • flFormElementImage
  • flFormElementInteger
  • flFormElementNumber
  • flFormElementPane
  • flFormElementPassword
  • flFormElementRadio
  • flFormElementRecaptcha
  • flFormElementSearch
  • flFormElementSelect
  • flFormElementSubmit
  • flFormElementText
  • flFormElementTextArea
  • flFormElementTextSuggest
  • flFormElementUri
  • flFormElementWYSIWYG
  • flFormValidator
  • flFormValidatorAttribMax
  • flFormValidatorAttribMin
  • flFormValidatorCustomJS
  • flFormValidatorEmail
  • flFormValidatorEquals
  • flFormValidatorInteger
  • flFormValidatorMax
  • flFormValidatorMaxChecklist
  • flFormValidatorMaxLength
  • flFormValidatorMin
  • flFormValidatorMinChecklist
  • flFormValidatorMinLength
  • flFormValidatorMultiEmail
  • flFormValidatorNotEquals
  • flFormValidatorNumber
  • flFormValidatorRegex
  • flFormValidatorRequired
  • flFormValidatorSameAs
  • flFormValidatorUri
  • flFtpClient
  • flGravatar
  • flHttpClient
  • flHttpClientCookie
  • flImage
  • flImageFilter
  • flImageFilterBrightness
  • flImageFilterColorize
  • flImageFilterContrast
  • flImageFilterEdgeDetect
  • flImageFilterEmboss
  • flImageFilterGaussianBlur
  • flImageFilterGrayscale
  • flImageFilterMeanRemoval
  • flImageFilterNegative
  • flImageFilterPixelate
  • flImageFilterSelectiveBlur
  • flImageFilterSepia
  • flImageFilterSepia2
  • flImageFilterSmooth
  • flIntegrity
  • flKeygen
  • flLog
  • flLogHandlerChrome
  • flLogHandlerLoggly
  • flLogHandlerPapertrail
  • flLogHandlerSlack
  • flMimeTypes
  • flModuleDbInstaller
  • flModuleMgr
  • flRegistry
  • flRequest
  • flRequestDbInstaller
  • flRequestThrottle
  • flResponse
  • flRouter
  • flRouterRoute
  • flRssChannel
  • flRssClient
  • flRssItem
  • flSearch
  • flSearchIndexer
  • flSearchManager
  • flSearchResults
  • flSearchTags
  • flSession
  • flSessionData
  • flSessionDb
  • flSessionDbInstaller
  • flSessionFile
  • flSessionMemcache
  • flSessionMemcached
  • flSessionRedis
  • flTemplateDbInstaller
  • flTemplateEngine
  • flTemplateManager
  • flTextHTML
  • flTextSplitWords
  • flTextStemmer
  • flTextStemmerEn
  • flTextStrip
  • flTimer
  • flUri
  • flUser
  • flUserAdapter
  • flUserAdapterRemote
  • flUserDbInstaller
  • flUserMgr
  • flUserPwdGen
  • flUserServerApiV1
  • flUtf8
  • flUuid
  • flVariables
  • flVariablesDbInstaller
  • flWidgetBreadcrumb
  • flWidgetFloatingActionMenu
  • flWidgetPagination
  • flWidgetTable
  • flWidgetTabs
  • flWidgetToolbar
  • flWidgetTreeChildNode
  • flWidgetTreeLinkNode
  • flWidgetTreeNode
  • flWidgetTreeView
  • fusionLib

Interfaces

  • flFormElementWYSIWYGCodeInterface
  • flFormElementWYSIWYGInterface
  • flFormElementWYSIWYGTransformInterface
  • flLogHandler
  • flModuleInstallInterface

Exceptions

  • flAcException
  • flAppException
  • flCacheException
  • flConfigException
  • flDateException
  • flDbException
  • flEventException
  • flException
  • flExceptionBadRequest
  • flExceptionForbidden
  • flExceptionLoadClass
  • flExceptionNotFound
  • flExceptionPHP
  • flFormException
  • flHttpClientException
  • flImageException
  • flRegistryException
  • flRequestThrottleException
  • flRouterException
  • flSessionException
  • flTemplateEngineException
  • flUserException
  • flVariablesException
  • flWidgetException

Functions

  • __
  • __noop
  • _flErrorHandler
  • _n
  • _n_noop

Class flImage

flImage Class

Class access image information and manipulate images.

Package: fusionLib
Copyright: Copyright (c) 2012 - 2014 fusionLib. All rights reserved.
Located at system/libs/Image/flImage.php

Methods summary

public
# __construct( string $file, integer $width = null, integer $height = null, integer $type = null )

Construct the object.

Construct the object.

Parameters

$file
The image file to load or null if not loading.
$width
The width of the image to create.
$height
The height of the image to create.
$type
One of IMAGETYPE_JPEG, IMAGETYPE_PNG or IMAGETYPE_GIF

Throws

flImageException
public resource
# getImageResource( )

Get the image resource loading it if required.

Get the image resource loading it if required.

Returns

resource
The image resource.
public array
# getDimensions( )

Get the dimensions of the image.

Get the dimensions of the image.

Returns

array
The width and height of the image.
public integer
# getWidth( )

Get the width of the image.

Get the width of the image.

Returns

integer
The width.
public integer
# getHeight( )

Get the height of the image.

Get the height of the image.

Returns

integer
The height.
public integer
# getType( )

The image type.

The image type.

Returns

integer
One of IMAGETYPE_JPEG, IMAGETYPE_PNG or IMAGETYPE_GIF
public flImage
# resize( integer $w, integer $h, boolean $scaleUp = false )

Resize the image to fit the given constraints while maintaining the aspect ratio.

Resize the image to fit the given constraints while maintaining the aspect ratio.

Parameters

$w
The width constraint or 0 to if no constraint.
$h
The height constraint or 0 to if no constraint.
$scaleUp
If true then the image will be scaled up or down to best fit the box, if false only scaling down will occur.

Returns

flImage
This object.
public flImage
# resizeCrop( integer $w, integer $h )

Resize the image to fit the given size while maintaining the aspect ratio and cropping off excess.

Resize the image to fit the given size while maintaining the aspect ratio and cropping off excess.

Parameters

$w
The required width of the image.
$h
The required height of the image.

Returns

flImage
This object.
public flImage
# crop( integer $x, integer $y, integer $w, integer $h )

Crop the selected region of the image out and keep it.

Crop the selected region of the image out and keep it.

Parameters

$x
The top left of the region.
$y
The top left of the region.
$w
The width of the region.
$h
The height of the region.

Returns

flImage
This object.
public flImage
# rotate( float $angle, integer $r, integer $g, integer $b, integer $a = null )

Rotate the image.

Rotate the image.

Parameters

$angle
The angle in degrees.
$r
The red for the background fill, 0 - 255
$g
The green for the background fill, 0 - 255
$b
The blue for the background fill, 0 - 255
$a
The alpha for the background fill, 0 - 127 or null if not used.

Returns

flImage
This image object.
public flImage
# rectangle( boolean $fill, integer $x1, integer $y1, integer $x2, integer $y2, integer $r, integer $g, integer $b, integer $a = null )

Draw a rectangle.

Draw a rectangle.

Parameters

$fill
True to fill the rectangle or false to outline.
$x1
Top left x coordinate.
$y1
Top left y coordinate.
$x2
Bottom right x coordinate.
$y2
Bottom right y coordinate.
$r
The red for the background fill, 0 - 255
$g
The green for the background fill, 0 - 255
$b
The blue for the background fill, 0 - 255
$a
The alpha for the background fill, 0 - 127 or null if not used.

Returns

flImage
This image object.
public flImage
# copyResampled( flImage $srcImage, integer $dx, integer $dy, integer $dw, integer $dh, integer $sx, integer $sy, integer $sw, integer $sh )

Copy a region of the source image into this image.

Copy a region of the source image into this image.

Parameters

$srcImage
The source image.
$dx
Destination x coordinate.
$dy
Destination y coordinate.
$dw
Destination width.
$dh
Destination height.
$sx
Source x coordinate.
$sy
Source y coordinate.
$sw
Source width.
$sh
Source height.

Returns

flImage
This image object.
public flImage
# applyFilter( flImageFilter $filter )

Apply a filter to this image.

Apply a filter to this image.

Parameters

$filter
The filter object.

Returns

flImage
This image object.
public boolean
# save( string $fileName = null, integer $quality = 90 )

Save the image to disk.

Save the image to disk.

Parameters

$fileName
The name to save the file under or null for the existing name.
$quality
For jpg the quality, default is 90.

Returns

boolean
true if the image was saved; else false.

Throws

flImageException
public
# output( integer $format = null, integer $quality = 90 )

Output the image to the browser.

Output the image to the browser.

Parameters

$format
null to use the current format or one of IMAGETYPE_PNG, IMAGETYPE_JPEG or IMAGETYPE_GIF
$quality
For jpg the quality, default is 90.

Throws

flImageException

Properties summary

protected integer $type

The image type

The image type

#
protected integer $height

The width of the image.

The width of the image.

#
protected integer $width

The width of the image.

The width of the image.

#
protected resource $image

The image resource.

The image resource.

# null
protected string $file

The file to load.

The file to load.

#
clearFusionCMS 3.0.0 API documentation generated by ApiGen