\PrivateBinVizhash16x16

Vizhash16x16

Example: $vz = new Vizhash16x16(); $data = $vz->generate(sha512('hello')); header('Content-type: image/png'); echo $data; exit;

Summary

Methods
Properties
Constants
__construct()
generate()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
getInt()
getX()
getY()
degrade()
drawshape()
$VALUES
$VALUES_INDEX
$width
$height
N/A

Properties

$VALUES

$VALUES : array

hash values

Type

array

$VALUES_INDEX

$VALUES_INDEX : integer

index of current value

Type

integer

$width

$width : integer

image width

Type

integer

$height

$height : integer

image height

Type

integer

Methods

__construct()

__construct() 

constructor

generate()

generate(string  $text) : string

Generate a 16x16 png corresponding to $text.

The given text should to be 128 to 150 characters long

Parameters

string $text

Returns

string —

PNG data. Or empty string if GD is not available.

getInt()

getInt() : integer

Returns a single integer from the $VALUES array (0.

..255)

Returns

integer

getX()

getX() : integer

Returns a single integer from the array (roughly mapped to image width)

Returns

integer

getY()

getY() : integer

Returns a single integer from the array (roughly mapped to image height)

Returns

integer

drawshape()

drawshape(resource  $image, integer  $action, integer  $color) 

Draw a shape

Parameters

resource $image
integer $action
integer $color