Implementation of EscposImage using the Imagick PHP plugin.
More...
|
| static | loadPdf ($pdfFile, int $pageWidth=550) |
| | Load a PDF for use on the printer. More...
|
| |
| static | isGdLoaded () |
| |
| static | isImagickLoaded () |
| |
| static | load (string $filename, bool $allowOptimisations=true, array $preferred=['imagick', 'gd', 'native']) |
| | This is a convinience method to load an image from file, auto-selecting an EscposImage implementation which uses an available library. More...
|
| |
Implementation of EscposImage using the Imagick PHP plugin.
◆ getColumnFormatFromFile()
| Mike42\Escpos\ImagickEscposImage::getColumnFormatFromFile |
( |
|
$filename = null, |
|
|
|
$highDensityVertical = true |
|
) |
| |
|
protected |
- Parameters
-
| string | $filename | Filename to load from |
| boolean | $highDensityVertical | True 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.
◆ getRasterFormatFromFile()
| Mike42\Escpos\ImagickEscposImage::getRasterFormatFromFile |
( |
|
$filename = null | ) |
|
|
protected |
- Parameters
-
| string | $filename | Filename to load from |
- Returns
- string|NULL Raster format data, or NULL if no optimised renderer is available in this implementation.
◆ loadImageData()
| Mike42\Escpos\ImagickEscposImage::loadImageData |
( |
string |
$filename = null | ) |
|
|
protected |
Load an image from disk, into memory, using Imagick.
- Parameters
-
| string | null | $filename | The filename to load from |
- Exceptions
-
| Exception | if the image format is not supported, or the file cannot be opened. |
◆ loadPdf()
| static Mike42\Escpos\ImagickEscposImage::loadPdf |
( |
|
$pdfFile, |
|
|
int |
$pageWidth = 550 |
|
) |
| |
|
static |
Load a PDF for use on the printer.
- Parameters
-
| string | $pdfFile | The file to load |
| int | $pageWidth | The width, in pixels, of the printer's output. The first page of the PDF will be scaled to approximately fit in this area. |
- Exceptions
-
| Exception | Where 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.
◆ readImageFromImagick()
| Mike42\Escpos\ImagickEscposImage::readImageFromImagick |
( |
Imagick |
$im | ) |
|
Load actual image pixels from Imagick object.
- Parameters
-
| Imagick | $im | Image to load from |
The documentation for this class was generated from the following file:
- src/Mike42/Escpos/ImagickEscposImage.php