Implementation of EscposImage using the GD PHP plugin.
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...
|
|
| $imgHeight = 0 |
| height of the image.
|
|
| $imgWidth = 0 |
| width of the image
|
|
Implementation of EscposImage using the GD PHP plugin.
◆ loadImageData()
Mike42\Escpos\GdEscposImage::loadImageData |
( |
string |
$filename = null | ) |
|
|
protected |
Load an image from disk, into memory, using GD.
- Parameters
-
string | null | $filename | The filename to load from |
- Exceptions
-
Exception | if the image format is not supported, or the file cannot be opened. |
◆ readImageFromGdResource()
Mike42\Escpos\GdEscposImage::readImageFromGdResource |
( |
|
$im | ) |
|
Load actual image pixels from GD resource.
- Parameters
-
resource | $im | GD resource to use |
- Exceptions
-
Exception | Where the image can't be read. |
The documentation for this class was generated from the following file:
- src/Mike42/Escpos/GdEscposImage.php