Constants

IMG_FORMAT_PNG

IMG_FORMAT_PNG = 1

IMG_FORMAT_JPEG

IMG_FORMAT_JPEG = 2

IMG_FORMAT_GIF

IMG_FORMAT_GIF = 3

IMG_FORMAT_WBMP

IMG_FORMAT_WBMP = 4

Properties

$w

$w : 

Type

$h

$h : 

Type

$color

$color : 

Type

$filename

$filename : 

Type

$im

$im : 

Type

$barcode

$barcode : 

Type

$dpi

$dpi : 

Type

$rotateDegree

$rotateDegree : 

Type

Methods

__construct()

__construct(  $filename = null, \BCGColor  $color) 

Constructor.

Parameters

$filename
\BCGColor $color

__destruct()

__destruct() 

Destructor.

getFilename()

getFilename() : string

Gets the filename.

Returns

string

setFilename()

setFilename(  $filename) 

Sets the filename.

Parameters

$filename

get_im()

get_im() : \resource.

Returns

\resource.

set_im()

set_im(resource  $im) 

Sets the image.

Parameters

resource $im

getBarcode()

getBarcode() : \BCGBarcode

Gets barcode for drawing.

Returns

\BCGBarcode

setBarcode()

setBarcode(\BCGBarcode  $barcode) 

Sets barcode for drawing.

Parameters

\BCGBarcode $barcode

getDPI()

getDPI() : float

Gets the DPI for supported filetype.

Returns

float

setDPI()

setDPI(float  $dpi) 

Sets the DPI for supported filetype.

Parameters

float $dpi

getRotationAngle()

getRotationAngle() : float

Gets the rotation angle in degree clockwise.

Returns

float

setRotationAngle()

setRotationAngle(float  $degree) 

Sets the rotation angle in degree clockwise.

Parameters

float $degree

draw()

draw() 

Draws the barcode on the image $im.

finish()

finish(integer  $image_style = self::IMG_FORMAT_PNG, integer  $quality = 100) 

Saves $im into the file (many format available).

Parameters

integer $image_style
integer $quality

drawException()

drawException(\Exception  $exception) 

Writes the Error on the picture.

Parameters

\Exception $exception

destroy()

destroy() 

Free the memory of PHP (called also by destructor).

init()

init() 

Init Image and color background.