PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of troels knak-nielsen  >  image_bmp  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: example use
Class: image_bmp
Generate images in BMP format without use of GDlib
Author: By
Last change:
Date: 11 years ago
Size: 401 bytes
 

Contents

Class file image Download
<?php
   
require_once('image_bmp.php');
   
$bmp = new bmp_image(256,256);

    for (
$i=0;$i<256;$i++)
       
$bmp->line(0, 0, round($i/2), round($i/5)+10, $i);
    for (
$i=0;$i<256;$i++)
       
$bmp->line(round($i/2), round($i/5)+10, 255, 255, $i);
   
$bmp->line(0, 0, 255, 0, 255);
   
$bmp->line(0, 0, 0, 255, 255);
   
$bmp->line(0, 255, 255, 255, 255);
   
$bmp->line(255, 0, 255, 255, 255);

   
$bmp->bmp_dump();
?>