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

$h

$h

$color

$color

$filename

$filename

$im

$im

$barcode

$barcode

$dpi

$dpi

$rotateDegree

$rotateDegree

Methods

__construct()

__construct(mixed  $filename = null, \BarcodeBakery\Common\BCGColor  $color) : mixed

Constructor.

Parameters

mixed $filename
\BarcodeBakery\Common\BCGColor $color

Returns

mixed —

__destruct()

__destruct() : mixed

Destructor.

Returns

mixed —

getFilename()

getFilename() : string

Gets the filename.

Returns

string —

setFilename()

setFilename(mixed  $filename) : mixed

Sets the filename.

Parameters

mixed $filename

Returns

mixed —

get_im()

get_im() : mixed

Returns

mixed —

set_im()

set_im(resource  $im) : mixed

Sets the image.

Parameters

resource $im

Returns

mixed —

getBarcode()

getBarcode() : \BarcodeBakery\Common\BCGBarcode

Gets barcode for drawing.

Returns

\BarcodeBakery\Common\BCGBarcode —

setBarcode()

setBarcode(\BarcodeBakery\Common\BCGBarcode  $barcode) : mixed

Sets barcode for drawing.

Parameters

\BarcodeBakery\Common\BCGBarcode $barcode

Returns

mixed —

getDPI()

getDPI() : float

Gets the DPI for supported filetype.

Returns

float —

setDPI()

setDPI(float  $dpi) : mixed

Sets the DPI for supported filetype.

Parameters

float $dpi

Returns

mixed —

getRotationAngle()

getRotationAngle() : float

Gets the rotation angle in degree clockwise.

Returns

float —

setRotationAngle()

setRotationAngle(float  $degree) : mixed

Sets the rotation angle in degree clockwise.

Parameters

float $degree

Returns

mixed —

draw()

draw() : mixed

Draws the barcode on the image $im.

Returns

mixed —

finish()

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

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

Parameters

int $image_style
int $quality

Returns

mixed —

drawException()

drawException(\BarcodeBakery\Common\Exception  $exception) : mixed

Writes the Error on the picture.

Parameters

\BarcodeBakery\Common\Exception $exception

Returns

mixed —

destroy()

destroy() : mixed

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

Returns

mixed —

init()

init() : mixed

Init Image and color background.

Returns

mixed —