escpos-php
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Mike42\Escpos\ImagickEscposImage Class Reference
Inheritance diagram for Mike42\Escpos\ImagickEscposImage:
Inheritance graph
[legend]
Collaboration diagram for Mike42\Escpos\ImagickEscposImage:
Collaboration graph
[legend]

Public Member Functions

 readImageFromImagick (\Imagick $im)
 
- Public Member Functions inherited from Mike42\Escpos\EscposImage
 __construct ($filename=null, $allowOptimisations=true)
 
 getHeight ()
 
 getHeightBytes ()
 
 getWidth ()
 
 getWidthBytes ()
 
 toRasterFormat ()
 
 toColumnFormat ($doubleDensity=false)
 

Static Public Member Functions

static loadPdf ($pdfFile, $pageWidth=550)
 
- Static Public Member Functions inherited from Mike42\Escpos\EscposImage
static isGdLoaded ()
 
static isImagickLoaded ()
 
static load ($filename, $allowOptimisations=true, array $preferred=['imagick', 'gd', 'native'])
 

Protected Member Functions

 getColumnFormatFromFile ($filename=null, $highDensityVertical=true)
 
 loadImageData ($filename=null)
 
 getRasterFormatFromFile ($filename=null)
 
- Protected Member Functions inherited from Mike42\Escpos\EscposImage
 loadImageData ($filename=null)
 
 setImgData ($data)
 
 setImgWidth ($width)
 
 setImgHeight ($height)
 
 getRasterFormatFromFile ($filename=null)
 
 getColumnFormatFromFile ($filename=null, $highDensityVertical=true)
 

Additional Inherited Members

- Protected Attributes inherited from Mike42\Escpos\EscposImage
 $imgHeight = 0
 
 $imgWidth = 0
 

Detailed Description

Implementation of EscposImage using the Imagick PHP plugin.

Member Function Documentation

Mike42\Escpos\ImagickEscposImage::getColumnFormatFromFile (   $filename = null,
  $highDensityVertical = true 
)
protected
Parameters
string$filenameFilename to load from
boolean$highDensityVerticalTrue for high density output (24px lines), false for regular density (8px)
Returns
string[]|NULL Column format data as array, or NULL if optimised renderer isn't available in this implementation.
Mike42\Escpos\ImagickEscposImage::getRasterFormatFromFile (   $filename = null)
protected
Parameters
string$filenameFilename to load from
Returns
string|NULL Raster format data, or NULL if no optimised renderer is available in this implementation.
Mike42\Escpos\ImagickEscposImage::loadImageData (   $filename = null)
protected

Load an image from disk, into memory, using Imagick.

Parameters
string | null$filenameThe filename to load from
Exceptions
Exceptionif the image format is not supported, or the file cannot be opened.
static Mike42\Escpos\ImagickEscposImage::loadPdf (   $pdfFile,
  $pageWidth = 550 
)
static

Load a PDF for use on the printer

Parameters
string$pdfFileThe file to load
int$pageWidthThe width, in pixels, of the printer's output. The first page of the PDF will be scaled to approximately fit in this area.
Exceptions
ExceptionWhere Imagick is not loaded, or where a missing file or invalid page number is requested.
Returns
array Array of images, retrieved from the PDF file.
Mike42\Escpos\ImagickEscposImage::readImageFromImagick ( \Imagick  $im)

Load actual image pixels from Imagick object

Parameters
Imagick$imImage to load from

The documentation for this class was generated from the following file: