PHP Class Zebra\Zpl\Image

Afficher le fichier Open project: robgridley/zebra Class Usage Examples

Protected Properties

Свойство Type Description
$encoded string The ASCII hexadecimal encoded image data.
$height integer The image height in pixels.
$image resource The GD image resource.
$width integer The image width in pixels.

Méthodes publiques

Méthode Description
__construct ( string $data ) Create an instance.
__destruct ( ) Destroy an instance.
height ( ) : integer
toAscii ( ) : string
width ( ) : integer

Méthodes protégées

Méthode Description
compress ( string $row, string $lastRow ) : string Compress a row of ASCII hexadecimal data.
compressRepeatingCharacters ( string $row ) : string Compress characters which repeat.
compressTrailingZerosOrOnes ( string $row ) : string Replace trailing zeros or ones with a comma (,) or exclamation (!) respectively.
create ( $data ) : resource Create a new GD image from the supplied string.
encode ( ) : string Encode the image in ASCII hexadecimal by looping over every pixel.

Method Details

__construct() public méthode

Create an instance.
public __construct ( string $data )
$data string

__destruct() public méthode

Destroy an instance.
public __destruct ( )

compress() protected méthode

Compress a row of ASCII hexadecimal data.
protected compress ( string $row, string $lastRow ) : string
$row string
$lastRow string
Résultat string

compressRepeatingCharacters() protected méthode

Compress characters which repeat.
protected compressRepeatingCharacters ( string $row ) : string
$row string
Résultat string

compressTrailingZerosOrOnes() protected méthode

Replace trailing zeros or ones with a comma (,) or exclamation (!) respectively.
protected compressTrailingZerosOrOnes ( string $row ) : string
$row string
Résultat string

create() protected méthode

Create a new GD image from the supplied string.
protected create ( $data ) : resource
$data
Résultat resource

encode() protected méthode

Encode the image in ASCII hexadecimal by looping over every pixel.
protected encode ( ) : string
Résultat string

height() public méthode

public height ( ) : integer
Résultat integer

toAscii() public méthode

public toAscii ( ) : string
Résultat string

width() public méthode

public width ( ) : integer
Résultat integer

Property Details

$encoded protected_oe property

The ASCII hexadecimal encoded image data.
protected string $encoded
Résultat string

$height protected_oe property

The image height in pixels.
protected int $height
Résultat integer

$image protected_oe property

The GD image resource.
protected resource $image
Résultat resource

$width protected_oe property

The image width in pixels.
protected int $width
Résultat integer