Returns the unformatted error messages as an array
array
getErrors
()
Returns the error messages as HTML
string
getHTMLErrors
()
Returns the rendered ASCII HTML image and CSS
string
getHTMLImage
()
Returns the height of the original bitmap image in pixels
integer
getImageHeight
()
Returns the width of the original bitmap image in pixels
integer
getImageWidth
()
Returns the class version number
string
getVersion
()
Checks if an error has occured
boolean
isError
()
Renders the image into HTML
The following modes are implemented:
- = black/white using $replaceCharacters by brightness,
- = colourized using $replaceCharacters by brightness,
- = colourized using a fixed character definded by $fixedChar.
A resolution of 1 means that every pixel is being replaced, whereas 5 for example means a scanned block of 5 pixel height and width, resulting in less data to replace.
void
renderHTMLImage
([integer $mode = 1], [integer $resolution = 2], [string $fixedChar = 'W'], [boolean $flipH = false], [boolean $flipV = false])
-
integer
$mode: Current version can handle mode 1, 2 or 3
-
integer
$resolution: Resolution for scanning the bitmap.
-
string
$fixedChar: Needed for mode 3
-
boolean
$flipH: Flip output horizontally?
-
boolean
$flipV: Flip output vertically?
Formatting error messages using CSS
void
setErrorCSS
(string $css)
-
string
$css: Stylesheet for error message
Tries to set the given bitmap image as source for the ASCII image and determines width and height
If $filename begins with "http://" (not case sensitive), an HTTP 1.0 connection is opened to the specified server, the page is requested using the HTTP GET method. If filename begins with "ftp://" (not case sensitive), an ftp connection to the specified server is opened. If the server does not support passive mode ftp, this will fail. If filename is one of "php://stdin", "php://stdout", or "php://stderr", the corresponding stdio stream will be opened. If filename begins with anything else, the file will be opened from the filesystem.
boolean
setFile
(string $filename)
Formatting the HTML Image using CSS
Tip: Use width-fixed fonts such as Courier only.
void
setImageCSS
(string $css)
-
string
$css: Stylesheet for the image