PHP Class Horde_Image_Png, horde

Copyright 2003-2014 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Mike Cochrane ([email protected])
Inheritance: extends Horde_Image_Base
Afficher le fichier Open project: horde/horde

Protected Properties

Свойство Type Description
$_colorDepth integer Color depth (only 8 and 16 implemented).
$_colorType integer Color type (only 2 (true color) implemented).
$_compressionMethod integer Compression method (0 is the only current valid value).
$_filterMethod integer Filter method (0 is the only current valid value).
$_img array The array of pixel data.
$_interlaceMethod integer Interlace method (only 0 (no interlace) implemented).

Méthodes publiques

Méthode Description
__construct ( $params, $context = [] ) PNG image constructor.
getContentType ( ) : string Returns the MIME type for this image.
getImageAtIndex ( integer $index ) : Horde_Image_Png Requests a specific image from the collection of images.
getImagePageCount ( ) : integer Returns the number of image pages available in the image object.
raw ( ) : string Returns the raw data for this image.
rectangle ( integer $x, integer $y, integer $width, integer $height, string $color = 'black', string $fill = 'none' ) Draws a rectangle.
reset ( ) Resets the image data to defaults.

Méthodes protégées

Méthode Description
_Adler32 ( $input ) Calculates an Adler32 checksum for a string.
_IDAT ( ) Creates the IDAT block.
_IEND ( ) Creates the IEND block.
_IHDR ( ) Creates the IHDR block.
_header ( ) Creates the PNG file header.
_tEXt ( $keyword, $text ) Creates the tEXt block.
_tIME ( integer $date = null ) Creates the tIME block.

Method Details

_Adler32() protected méthode

Calculates an Adler32 checksum for a string.
protected _Adler32 ( $input )

_IDAT() protected méthode

Creates the IDAT block.
protected _IDAT ( )

_IEND() protected méthode

Creates the IEND block.
protected _IEND ( )

_IHDR() protected méthode

Creates the IHDR block.
protected _IHDR ( )

__construct() public méthode

PNG image constructor.
public __construct ( $params, $context = [] )

_header() protected méthode

Creates the PNG file header.
protected _header ( )

_tEXt() protected méthode

Creates the tEXt block.
protected _tEXt ( $keyword, $text )

_tIME() protected méthode

Creates the tIME block.
protected _tIME ( integer $date = null )
$date integer A timestamp.

getContentType() public méthode

Returns the MIME type for this image.
public getContentType ( ) : string
Résultat string The MIME type for this image.

getImageAtIndex() public méthode

Requests a specific image from the collection of images.
public getImageAtIndex ( integer $index ) : Horde_Image_Png
$index integer The index to return
Résultat Horde_Image_Png

getImagePageCount() public méthode

Returns the number of image pages available in the image object.
public getImagePageCount ( ) : integer
Résultat integer The number of images.

raw() public méthode

Returns the raw data for this image.
public raw ( ) : string
Résultat string The raw image data.

rectangle() public méthode

Draws a rectangle.
public rectangle ( integer $x, integer $y, integer $width, integer $height, string $color = 'black', string $fill = 'none' )
$x integer The left x-coordinate of the rectangle.
$y integer The top y-coordinate of the rectangle.
$width integer The width of the rectangle.
$height integer The height of the rectangle.
$color string The line color of the rectangle.
$fill string The color to fill the rectangle.

reset() public méthode

Resets the image data to defaults.
public reset ( )

Property Details

$_colorDepth protected_oe property

Color depth (only 8 and 16 implemented).
protected int $_colorDepth
Résultat integer

$_colorType protected_oe property

Color type (only 2 (true color) implemented).
protected int $_colorType
Résultat integer

$_compressionMethod protected_oe property

Compression method (0 is the only current valid value).
protected int $_compressionMethod
Résultat integer

$_filterMethod protected_oe property

Filter method (0 is the only current valid value).
protected int $_filterMethod
Résultat integer

$_img protected_oe property

The array of pixel data.
protected array $_img
Résultat array

$_interlaceMethod protected_oe property

Interlace method (only 0 (no interlace) implemented).
protected int $_interlaceMethod
Résultat integer