Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 3 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.25truetrue);
?>
</body>
</html>