Pdf/Resource/Image/Png.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Pdf  
Version
$Id: Png.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Pdf_Resource_Image_Png

Package: Zend\Pdf

PNG image

Parent(s)
\Zend_Pdf_Resource_Image < \Zend_Pdf_Resource
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Constant  PNG_COMPRESSION_DEFAULT_STRATEGY = 0
Constant  PNG_COMPRESSION_FILTERED = 1
Constant  PNG_COMPRESSION_HUFFMAN_ONLY = 2
Constant  PNG_COMPRESSION_RLE = 3
Constant  PNG_FILTER_NONE = 0
Constant  PNG_FILTER_SUB = 1
Constant  PNG_FILTER_UP = 2
Constant  PNG_FILTER_AVERAGE = 3
Constant  PNG_FILTER_PAETH = 4
Constant  PNG_INTERLACING_DISABLED = 0
Constant  PNG_INTERLACING_ENABLED = 1
Constant  PNG_CHANNEL_GRAY = 0
Constant  PNG_CHANNEL_RGB = 2
Constant  PNG_CHANNEL_INDEXED = 3
Constant  PNG_CHANNEL_GRAY_ALPHA = 4
Constant  PNG_CHANNEL_RGB_ALPHA = 6

Properties

Propertyprotected$_height =
Details
Type
n/a
Propertyprotected$_imageProperties =
Details
Type
n/a
Propertyprotected\Zend_Pdf_ElementFactory_Interface $_objectFactory =
inherited

Each Pdf resource (fonts, images, .

Inherited from: \Zend_Pdf_Resource::$$_objectFactory\Zend_Pdf_Resource_Image::$$_objectFactory

..) interacts with a PDF itself. It creates appropriate PDF objects, structures and sometime embedded files. Resources are referenced in content streams by names, which are stored in a page resource dictionaries.

Thus, resources must be attached to the PDF.

Resource abstraction uses own PDF object factory to store all necessary information. At the render time internal object factory is appended to the global PDF file factory.

Resource abstraction also cashes information about rendered PDF files and doesn't duplicate resource description each time then Resource is rendered (referenced).

Details
Type
\Zend_Pdf_ElementFactory_Interface
Inherited_from
\Zend_Pdf_Resource::$$_objectFactory  
Inherited_from
\Zend_Pdf_Resource_Image::$$_objectFactory  
Propertyprotected\Zend_Pdf_Element_Object $_resource =
inherited

Main resource object

Inherited from: \Zend_Pdf_Resource::$$_resource\Zend_Pdf_Resource_Image::$$_resource
Propertyprotected$_width =
Details
Type
n/a

Methods

methodpublic__clone() : void
inherited

Clone page, extract it and dependent objects from the current document, so it can be used within other docs.

Inherited from: \Zend_Pdf_Resource::__clone()\Zend_Pdf_Resource_Image::__clone()
methodpublic__construct(string $imageFileName) : void

Object constructor

If resource is not a Zend_Pdf_Element object, then stream object with specified value is generated.

Parameters
Name Type Description
$imageFileName string
Throws
Exception Description
\Zend_Pdf_Exception
Details
Todo
Add compression conversions to support compression strategys other than PNG_COMPRESSION_DEFAULT_STRATEGY.  
Todo
Add pre-compression filtering.  
Todo
Add interlaced image handling.  
Todo
Add support for 16-bit images. Requires PDF version bump to 1.5 at least.  
Todo
Add processing for all PNG chunks defined in the spec. gAMA etc.  
Todo
Fix tRNS chunk support for Indexed Images to a SMask.  
methodpublicgetPixelHeight() : integer

Image height

Returns
Type Description
integer
methodpublicgetPixelWidth() : integer

Image width

Returns
Type Description
integer
methodpublicgetProperties() : array

Image properties

Returns
Type Description
array
Documentation was generated by phpDocumentor 2.0.0a8.