class non_gd

Main non-gd captcha class

Properties

$filtered_pngs
$width
$height

Methods

__construct()

Define filtered pngs on init

execute($code, $seed)

Create the image containing $code with a seed of $seed

randomise($scanline, $width)

This is designed to randomise the pixels of the image data within certain limits so as to keep it readable. It also varies the image width a little

png_chunk($length, $type, $data)

This creates a chunk of the given type, with the given data of the given length adding the relevant crc

create_png($raw_image, $width, $height)

Creates greyscale 8bit png - The PNG spec can be found at http://www.libpng.org/pub/png/spec/PNG-Contents.html we use png because it's a fully recognised open standard and supported by practically all modern browsers and OSs

define_filtered_pngs()

png image data Each 'data' element is base64_encoded uncompressed IDAT

Details

at line 29
__construct()

Define filtered pngs on init

at line 38
execute($code, $seed)

Create the image containing $code with a seed of $seed

Parameters

$code
$seed

at line 113
randomise($scanline, $width)

This is designed to randomise the pixels of the image data within certain limits so as to keep it readable. It also varies the image width a little

Parameters

$scanline
$width

at line 143
png_chunk($length, $type, $data)

This creates a chunk of the given type, with the given data of the given length adding the relevant crc

Parameters

$length
$type
$data

at line 156
create_png($raw_image, $width, $height)

Creates greyscale 8bit png - The PNG spec can be found at http://www.libpng.org/pub/png/spec/PNG-Contents.html we use png because it's a fully recognised open standard and supported by practically all modern browsers and OSs

Parameters

$raw_image
$width
$height

at line 237
define_filtered_pngs()

png image data Each 'data' element is base64_encoded uncompressed IDAT