Overview

Packages

  • Image
  • None

Classes

  • Horde_Image
  • Horde_Image_Base
  • Horde_Image_Effect
  • Horde_Image_Effect_Border
  • Horde_Image_Effect_Gd_DropShadow
  • Horde_Image_Effect_Gd_RoundCorners
  • Horde_Image_Effect_Gd_TextWatermark
  • Horde_Image_Effect_Gd_Unsharpmask
  • Horde_Image_Effect_Im_Border
  • Horde_Image_Effect_Im_CenterCrop
  • Horde_Image_Effect_Im_Composite
  • Horde_Image_Effect_Im_DropShadow
  • Horde_Image_Effect_Im_LiquidResize
  • Horde_Image_Effect_Im_PhotoStack
  • Horde_Image_Effect_Im_PolaroidImage
  • Horde_Image_Effect_Im_RoundCorners
  • Horde_Image_Effect_Im_TextWatermark
  • Horde_Image_Effect_Im_Unsharpmask
  • Horde_Image_Effect_Imagick_Border
  • Horde_Image_Effect_Imagick_CenterCrop
  • Horde_Image_Effect_Imagick_Composite
  • Horde_Image_Effect_Imagick_DropShadow
  • Horde_Image_Effect_Imagick_LiquidResize
  • Horde_Image_Effect_Imagick_PhotoStack
  • Horde_Image_Effect_Imagick_PolaroidImage
  • Horde_Image_Effect_Imagick_RoundCorners
  • Horde_Image_Effect_Imagick_SmartCrop
  • Horde_Image_Effect_Imagick_TextWatermark
  • Horde_Image_Effect_Imagick_Unsharpmask
  • Horde_Image_Exception
  • Horde_Image_Exif
  • Horde_Image_Exif_Base
  • Horde_Image_Exif_Bundled
  • Horde_Image_Exif_Exiftool
  • Horde_Image_Exif_Parser_Base
  • Horde_Image_Exif_Php
  • Horde_Image_Gd
  • Horde_Image_Im
  • Horde_Image_Imagick
  • Horde_Image_Png
  • Horde_Image_Svg
  • Horde_Image_Swf
  • Horde_Image_Translation
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Image_Png

This class implements the Horde_Image:: API for PNG images. It mainly provides some utility functions, such as the ability to make pixels or solid images for now.

Copyright 2003-2012 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.

EmptyIterator implements Iterator, Traversable
Extended by Horde_Image_Base
Extended by Horde_Image_Png
Package: Image
Author: Mike Cochrane mike@graftonhall.co.nz
Located at Horde/Image/Png.php
Methods summary
public
# __construct( array $params, array $context = array() )

PNG image constructor.

PNG image constructor.

Parameters

$params
The image object parameters. Values include: <pre>(optional)width - The desired image width (optional)height - The desired image height (optional)type - The image type (png, jpeg etc...) <span class="php-keyword1">If</span> not provided, <span class="php-keyword1">or</span> set by the <span class="php-keyword2">setType</span> method, any image output will be converted to the <span class="php-keyword1">default</span> image type of png. (optional)data - The image binary data.</pre>
$context
The object context - configuration, injected objects <pre>(required)tmpdir - Temporary directory (optional)logger - The logger</pre>

Throws

InvalidArgumentException
public string
# getContentType( )

Return the content type for this image.

Return the content type for this image.

Returns

string
The content type for this image.

Overrides

Horde_Image_Base::getContentType()
public string
# raw( )

Return the raw data for this image.

Return the raw data for this image.

Returns

string
The raw image data.

Overrides

Horde_Image_Base::raw()
public
# reset( )

Reset the image data.

Reset the image data.

Overrides

Horde_Image_Base::reset()
public
# rectangle( integer $x, integer $y, integer $width, integer $height, string $color = 'black', string $fill = 'none' )

Draw a rectangle.

Draw a rectangle.

Parameters

$x
The left x-coordinate of the rectangle.
$y
The top y-coordinate of the rectangle.
$width
The width of the rectangle.
$height
The height of the rectangle.
$color
The line color of the rectangle.
$fill
The color to fill the rectangle with.
public
# _header( )

Create the PNG file header.

Create the PNG file header.

public
# _IHDR( )

Create Image Header block.

Create Image Header block.

public
# _IEND( )

Create IEND block.

Create IEND block.

public
# _IDAT( )

Create Image Data block.

Create Image Data block.

public
# _tEXt( mixed $keyword, mixed $text )

Create tEXt block.

Create tEXt block.

public
# _tIME( mixed $date = null )

Create last modified time block.

Create last modified time block.

public
# _Adler32( mixed $input )

Calculate an Adler32 checksum for a string.

Calculate an Adler32 checksum for a string.

public Horde_Image_Base
# getImageAtIndex( integer $index )

Request a specific image from the collection of images.

Request a specific image from the collection of images.

Parameters

$index
The index to return

Returns

Horde_Image_Base

Throws

Horde_Image_Exception
public integer
# getImagePageCount( )

Return the number of image pages available in the image object.

Return the number of image pages available in the image object.

Returns

integer
Methods inherited from Horde_Image_Base
addEffect(), applyEffects(), brush(), clearGeometry(), display(), getCapabilities(), getDimensions(), getLoadedEffects(), getTmpDir(), getType(), hasCapability(), headers(), loadFile(), loadString(), setType(), toFile()
Methods inherited from EmptyIterator
current(), key(), next(), rewind(), valid()
Properties summary
public array $_img

The array of pixel data.

The array of pixel data.

# array()
public integer $_colorDepth

Color depth (only 8 and 16 implemented).

Color depth (only 8 and 16 implemented).

# 8
public integer $_colorType

Color type (only 2 (true color) implemented).

Color type (only 2 (true color) implemented).

# 2
public integer $_compressionMethod

Compression method (0 is the only current valid value).

Compression method (0 is the only current valid value).

# 0
public integer $_filterMethod

Filter method (0 is the only current valid value).

Filter method (0 is the only current valid value).

# 0
public integer $_interlaceMethod

Interlace method (only 0 (no interlace) implemented).

Interlace method (only 0 (no interlace) implemented).

# 0
API documentation generated by ApiGen