$gallery
$gallery : integer
The gallery id of this image's parent gallery
Class to describe a single Ansel image.
Copyright 2001-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
__construct(array $image = array()) : \Ansel_Image
Const'r
array | $image |
getVFSPath(string $view = 'full', \Ansel_Style $style = null) : string
Return the vfs path for this image.
string | $view | The view we want. |
\Ansel_Style | $style | A gallery style. |
The vfs path for this image.
load(string $view = 'full', \Ansel_Style $style = null)
Loads the given view into memory.
string | $view | Which view to load. |
\Ansel_Style | $style | The gallery style. |
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.
integer | $id | Image id to check |
string | $view | Which view to check for |
\Ansel_Style | $style | Style object |
False if image does not exists | string vfs name
createView(string $view, \Ansel_Style $style = null, $watermark = '')
Creates and caches the given view.
string | $view | Which view to create. |
\Ansel_Style | $style | A style object |
$watermark |
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
string | $data | The new data for this image. |
string | $view | If specified, the $data represents only this particular view. Cache will not be deleted. |
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.
boolean | $replacing | Set to true if we are replacing the exif data. |
True if any local properties were modified, False if not.
display(string $view = 'full', \Ansel_Style $style = null)
Display the requested view.
string | $view | Which view to display. |
\Ansel_Style | $style | Force use of this gallery style. |
Ansel_Exception
getDimensions(string $view = 'full') : array
Returns the dimensions of the given view.
string | $view | The view (full, screen etc..) to get dimensions for |
A hash of 'width and 'height' dimensions.
None found |
rotate(string $view = 'full', integer $angle = 90)
Rotates the image.
string | $view | The view (size) to work with. |
integer | $angle | What angle to rotate the image by. |
todo |
Ansel 4: reverse order of parameters so we can make $angle required but $view optional. In fact, view can be taken out entirely as we only ever need to rotate the full image anyway. |
---|
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.
integer | $x1 | |
integer | $y1 | |
integer | $x2 | |
integer | $y2 |
None found |
resize(integer $width, integer $height, boolean $ratio = true, boolean $keepProfile = false)
Resize the current image.
integer | $width | The new width. |
integer | $height | The new height. |
boolean | $ratio | Maintain original aspect ratio. |
boolean | $keepProfile | Keep the image meta data. |
None found |
grayscale(string $view = 'full')
Converts the image to grayscale.
string | $view | The view (screen, full, etc...) to work with. |
None found |
watermark(string $view = 'full', string $watermark = null, string $halign = null, string $valign = null, string $font = null)
Watermarks the image.
string | $view | The view (size) to work with. |
string | $watermark | String to use as the watermark. |
string | $halign | Horizontal alignment (Left, Right, Center) |
string | $valign | Vertical alignment (Top, Center, Bottom) |
string | $font | The font to use (not all image drivers will support this). |
None found |
flip(string $view = 'full')
Flips the image.
string | $view | The view to work with. |
None found |
mirror(string $view = 'full')
Mirrors the image.
string | $view | The view (size) to work with. |
None found |
addEffect(string $type, array $params = array())
Add an effect to the effect stack
string | $type | The effect to add. |
array | $params | The effect parameters. |
None found |
applyEffects()
Apply any pending effects to the underlaying Horde_Image
None found |
getTags() : array
Returns this image's tags.
Ansel_Exception
An array of tags
None found |
setTags(array $tags, boolean $replace = true)
Either add or replace this image's tags.
array | $tags | An array of tag names |
boolean | $replace | Replace all tags with those provided. |
None found |
removeTag(string $tag)
Remove a single tag from this image's tag collection
string | $tag | The tag name to remove. |
None found |
getTile(\Ansel_Gallery $parent = null, \Ansel_Style $style = null, boolean $mini = false, array $params = array()) : string
Get the Ansel_View_Image_Thumb object
\Ansel_Gallery | $parent | The parent Ansel_Gallery object. |
\Ansel_Style | $style | A gallery definition to use. |
boolean | $mini | Force the use of a mini thumbnail? |
array | $params | Any additional parameters the Ansel_Tile object may need. |
HTML for this image's view tile.
None found |
getType( $view = 'full') : string
Get the image type for the requested view.
$view |
The requested view's mime type
None found |
getViewHash(string $view, \Ansel_Style $style = null) : string
Return a hash key for the given view and style.
string | $view | The view (thumb, prettythumb etc...) |
\Ansel_Style | $style | The style. |
A md5 hash suitable for use as a key.
None found |
getAttributes() : array
Get the image attributes from the backend.
A hash of Exif fieldnames => values.
None found |
isMultiPage() : boolean
Indicates if this image represents a multipage image.
None found |
getImagePageCount() : integer
Get the number of pages that a multipage image contains.
The number of pages.
None found |
None found |
current() : \Ansel_Image
Return the current image from the internal iterator.
None found |
key() : integer
Get the index of the internal iterator.
None found |
None found |
valid() : boolean
Deterimines if the current iterator item is valid.
None found |
_writeData() : boolean
Writes the current data to vfs, used when creating a new image
None found |
_exifToTags(array $fields = array()) : void
Adds specified EXIF fields to this image's tags.
Called during image upload/creation.
array | $fields | An array of EXIF fields to import as a tag. |
None found |
_autoRotate( $orientation)
Autorotate based on EXIF orientation field. Updates the data in memory only.
$orientation |
None found |
_buildImageObject(\Horde_Image_Base $image) : \Ansel_Image
Build an Ansel_Image from a given Horde_Image.
Used to wrap iterating the Horde_Image
\Horde_Image_Base | $image | The Horde_Image |
None found |