PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Artur Graniszewski   ASCII art generator for PHP   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: ASCII art generator for PHP
Generate a text that looks like a given image
Author: By
Last change:
Date: 13 years ago
Size: 326 bytes
 

Contents

Class file image Download
<?php

require_once('ascii_art.php');
$x = new AsciiArt('example.jpg');
$color = $x->getBackgroundColor()->getHexValue();
?>
<html>
<head>
<title>ASCII art demo</title>
</head>
<body bgcolor="#<?php echo $color; ?>">
<?php
$x
->setFontSize(6);
$x->show(range("a", "z"), 0.25, true, true);
?>
</body>
</html>