PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Enéas Gesing   Image2Char   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Usage Example
Class: Image2Char
Convert image to HTML with ASCII art characters
Author: By
Last change:
Date: 17 years ago
Size: 489 bytes
 

Contents

Class file image Download
<?
include ('image2html.class.php');
?>

<html>
<head>
<style>
body{
    font-size: 8px;
    font-family: Courier; /* recommended use of terminal fonts like Courier, Lucida Console, etc */
    font-weight: bold;
}
</style>
</head>
<body>
<?
// parameter is the image that will be converted
$image = new Image2HTML('ok.png');
// this chars will compose the art
$image->chars = 'USETHISCHARS';
// place this where you want to show your art
$image->Show();
?>
</body>
</html>