PHP Class Mike42\Escpos\ImagickEscposImage

Inheritance: extends EscposImage
Afficher le fichier Open project: mike42/escpos-php Class Usage Examples

Méthodes publiques

Méthode Description
loadPdf ( string $pdfFile, string $pageWidth = 550 ) : multitype:EscposImage Load a PDF for use on the printer
readImageFromImagick ( Imagick $im ) Load actual image pixels from Imagick object

Méthodes protégées

Méthode Description
getColumnFormatFromFile ( string $filename = null, boolean $highDensityVertical = true ) : string[] | null
getRasterFormatFromFile ( string $filename = null ) : string | null
loadImageData ( string $filename = null ) Load an image from disk, into memory, using Imagick.

Private Methods

Méthode Description
alphaRemove ( Imagick $im ) : Imagick Paste image over white canvas to stip transparency reliably on different versions of ImageMagick.
getColumnFormatFromImage ( Imagick $im, integer $lineHeight ) : string[] Return data in column format as array of slices.
getImageFromFile ( string $filename ) : Imagick Load Imagick file from image
getRasterBlobFromImage ( Imagick $im ) : string Pull blob (from PBM-formatted image only!), and spit out a blob or raster data.

Method Details

getColumnFormatFromFile() protected méthode

protected getColumnFormatFromFile ( string $filename = null, boolean $highDensityVertical = true ) : string[] | null
$filename string Filename to load from
$highDensityVertical boolean True for high density output (24px lines), false for regular density (8px)
Résultat string[] | null Column format data as array, or NULL if optimised renderer isn't available in this implementation.

getRasterFormatFromFile() protected méthode

protected getRasterFormatFromFile ( string $filename = null ) : string | null
$filename string Filename to load from
Résultat string | null Raster format data, or NULL if no optimised renderer is available in this implementation.

loadImageData() protected méthode

Load an image from disk, into memory, using Imagick.
protected loadImageData ( string $filename = null )
$filename string The filename to load from

loadPdf() public static méthode

Load a PDF for use on the printer
public static loadPdf ( string $pdfFile, string $pageWidth = 550 ) : multitype:EscposImage
$pdfFile string The file to load
$pageWidth string The width, in pixels, of the printer's output. The first page of the PDF will be scaled to approximately fit in this area.
Résultat multitype:EscposImage

readImageFromImagick() public méthode

Load actual image pixels from Imagick object
public readImageFromImagick ( Imagick $im )
$im Imagick Image to load from