Property | Type | Description | |
---|---|---|---|
$caption | string | Image caption | |
$commentCount | integer | The number of comments for this image, if available. | |
$facesCount | integer | Number of faces in this image | |
$filename | string | The filename for this image | |
$gallery | integer | The gallery id of this image's parent gallery | |
$geotag_timestamp | integer | Timestamp for when image was geotagged | |
$id | integer | Image Id | |
$lat | string | Latitude | |
$lng | string | Longitude | |
$location | string | Textual location | |
$originalDate | integer | Timestamp of original date. | |
$sort | integer | Sort count for this image | |
$type | string | The image's mime type | |
$uploaded | integer | Timestamp of uploaded datetime |
Property | Type | Description | |
---|---|---|---|
$_data | array | Binary image data for loaded views | |
$_dirty | boolean | Dirty flag | |
$_exif | array | Cache the raw EXIF data locally | |
$_image | Horde_Image_Base | Horde_Image object for this image. | |
$_loaded | array | Flags for loaded views | |
$_tags | array | Holds an array of tags for this image |
Method | Description | |
---|---|---|
__construct ( array $image = [] ) : Ansel_Image | Const'r | |
addEffect ( string $type, array $params = [] ) | Add an effect to the effect stack | |
applyEffects ( ) | Apply any pending effects to the underlaying Horde_Image | |
createView ( string $view, Ansel_Style $style = null, $watermark = '' ) | Creates and caches the given view. | |
crop ( integer $x1, integer $y1, integer $x2, integer $y2 ) | Crop this image to desired dimensions. Crops the currently loaded view present in the Horde_Image object. | |
current ( ) : Ansel_Image | Return the current image from the internal iterator. | |
deleteCache ( string $view = 'all' ) | Deletes the specified cache file. | |
display ( string $view = 'full', Ansel_Style $style = null ) | Display the requested view. | |
downloadHeaders ( string $view = 'full' ) | Sends the correct HTTP headers to the browser to download this image. | |
flip ( string $view = 'full' ) | Flips the image. | |
geotag ( string $lat, string $lng, string $location = '' ) | Update the image's geotag data. Saves to backend storage as well, so no need to call self::save() | |
getAttributes ( ) : array | Get the image attributes from the backend. | |
getDimensions ( string $view = 'full' ) : array | Returns the dimensions of the given view. | |
getEXIF ( boolean $replacing = false ) : boolean | Reads the EXIF data from the image, caches in the object and writes to storage. Also populates any local properties that come from the EXIF data. | |
getHordeImage ( ) : Horde_Image_Base | Obtain a reference to the underlying Horde_Image | |
getImagePageCount ( ) : integer | Get the number of pages that a multipage image contains. | |
getTags ( ) : array | Returns this image's tags. | |
getTile ( Ansel_Gallery $parent = null, Ansel_Style $style = null, boolean $mini = false, array $params = [] ) : string | Get the Ansel_View_Image_Thumb object | |
getType ( $view = 'full' ) : string | Get the image type for the requested view. | |
getVFSName ( string $view ) : string | Returns the file name of this image as used in the VFS backend. | |
getVFSPath ( string $view = 'full', Ansel_Style $style = null ) : string | Return the vfs path for this image. | |
getVFSPathFromHash ( string $hash ) : string | Generate a path on the VFS given a known style hash. | |
getViewHash ( string $view, Ansel_Style $style = null ) : string | Return a hash key for the given view and style. | |
grayscale ( string $view = 'full' ) | Converts the image to grayscale. | |
isMultiPage ( ) : boolean | Indicates if this image represents a multipage image. | |
key ( ) : integer | Get the index of the internal iterator. | |
load ( string $view = 'full', Ansel_Style $style = null ) | Loads the given view into memory. | |
mirror ( string $view = 'full' ) | Mirrors the image. | |
next ( ) : mixed | Advance the iterator | |
raw ( string $view = 'full' ) : string | Returns the raw data for the given view. | |
removeTag ( string $tag ) | Remove a single tag from this image's tag collection | |
replace ( array $imageData ) : void | Replace this image's image data. | |
reset ( ) | Reset the image, removing all loaded views. | |
resize ( integer $width, integer $height, boolean $ratio = true, boolean $keepProfile = false ) | Resize the current image. | |
rewind ( ) : void | Reset the iterator to the first image in the set. | |
rotate ( string $view = 'full', integer $angle = 90 ) | Rotates the image. | |
save ( ) : integer | Save image details to storage. | |
setTags ( array $tags, boolean $replace = true ) | Either add or replace this image's tags. | |
toFile ( string $view = 'full' ) : string | Wraps the given view into a file. | |
updateData ( string $data, string $view = 'full' ) | Change the image data. Deletes old cache and writes the new data to the VFS. Used when updating an image | |
valid ( ) : boolean | Deterimines if the current iterator item is valid. | |
viewExists ( integer $id, string $view, Ansel_Style $style ) : mixed | Check if an image view exists and returns the vfs name complete with the hash directory name prepended if appropriate. | |
watermark ( string $view = 'full', string $watermark = null, string $halign = null, string $valign = null, string $font = null ) | Watermarks the image. |
Method | Description | |
---|---|---|
_autoRotate ( $orientation ) | Autorotate based on EXIF orientation field. Updates the data in memory only. | |
_buildImageObject ( Horde_Image_Base $image ) : Ansel_Image | Build an Ansel_Image from a given Horde_Image. | |
_exifToTags ( array $fields = [] ) : void | Adds specified EXIF fields to this image's tags. | |
_writeData ( ) : boolean | Writes the current data to vfs, used when creating a new image |
public __construct ( array $image = [] ) : Ansel_Image | ||
$image | array | |
return | Ansel_Image |
protected _autoRotate ( $orientation ) |
protected _buildImageObject ( Horde_Image_Base $image ) : Ansel_Image | ||
$image | Horde_Image_Base | The Horde_Image |
return | Ansel_Image |
protected _exifToTags ( array $fields = [] ) : void | ||
$fields | array | An array of EXIF fields to import as a tag. |
return | void |
protected _writeData ( ) : boolean | ||
return | boolean |
public applyEffects ( ) |
public createView ( string $view, Ansel_Style $style = null, $watermark = '' ) | ||
$view | string | Which view to create. |
$style | Ansel_Style | A style object |
public current ( ) : Ansel_Image | ||
return | Ansel_Image |
public deleteCache ( string $view = 'all' ) | ||
$view | string | Which cache file to delete. |
public downloadHeaders ( string $view = 'full' ) | ||
$view | string | The view to download. |
public getAttributes ( ) : array | ||
return | array | A hash of Exif fieldnames => values. |
public getDimensions ( string $view = 'full' ) : array | ||
$view | string | The view (full, screen etc..) to get dimensions for |
return | array | A hash of 'width and 'height' dimensions. |
public getHordeImage ( ) : Horde_Image_Base | ||
return | Horde_Image_Base |
public getImagePageCount ( ) : integer | ||
return | integer | The number of pages. |
public getTile ( Ansel_Gallery $parent = null, Ansel_Style $style = null, boolean $mini = false, array $params = [] ) : string | ||
$parent | Ansel_Gallery | The parent Ansel_Gallery object. |
$style | Ansel_Style | A gallery definition to use. |
$mini | boolean | Force the use of a mini thumbnail? |
$params | array | Any additional parameters the Ansel_Tile object may need. |
return | string | HTML for this image's view tile. |
public getVFSName ( string $view ) : string | ||
$view | string | The image view (full, screen, thumb, mini). |
return | string | This image's VFS file name. |
public getVFSPath ( string $view = 'full', Ansel_Style $style = null ) : string | ||
$view | string | The view we want. |
$style | Ansel_Style | A gallery style. |
return | string | The vfs path for this image. |
public getVFSPathFromHash ( string $hash ) : string | ||
$hash | string | The sytle hash |
return | string | the VFS path to the directory for the provided hash |
public getViewHash ( string $view, Ansel_Style $style = null ) : string | ||
$view | string | The view (thumb, prettythumb etc...) |
$style | Ansel_Style | The style. |
return | string | A md5 hash suitable for use as a key. |
public isMultiPage ( ) : boolean | ||
return | boolean |
public updateData ( string $data, string $view = 'full' ) | ||
$data | string | The new data for this image. |
$view | string | If specified, the $data represents only this particular view. Cache will not be deleted. |
public watermark ( string $view = 'full', string $watermark = null, string $halign = null, string $valign = null, string $font = null ) | ||
$view | string | The view (size) to work with. |
$watermark | string | String to use as the watermark. |
$halign | string | Horizontal alignment (Left, Right, Center) |
$valign | string | Vertical alignment (Top, Center, Bottom) |
$font | string | The font to use (not all image drivers will support this). |
protected Horde_Image_Base $_image | ||
return | Horde_Image_Base |
public int $commentCount | ||
return | integer |
public int $gallery | ||
return | integer |
public int $geotag_timestamp | ||
return | integer |