PHP Classes
elePHPant
Icontem

File: example

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tomas Volf  >  PHPico  >  example  >  Download  
File: example
Role: Example script
Content type: text/plain
Description: example
Class: PHPico
Create and manipulate icons in the ICO format
Author: By
Last change:
Date: 4 years ago
Size: 386 bytes
 

Contents

Class file image Download
<?php
    set_time_limit
(2);
    require_once(
'PHPico.php');
   
$i = new PHPico\Image();
   
$i->createBlankImage(8, 8, 8);
   
$i->addColor(0, 3, 255, 0, 0, 0);
   
$i->addColor(0, 2, 0, 255, 0, 0);
   
$i->addColor(0, 1, 0, 0, 255, 0);
   
$i->setPixel(0, 0, 0, 3, 0);
   
$i->setPixel(0, 1, 1, 2, 0);
   
$i->setPixel(0, 2, 2, 1, 0);
   
$i->setPixel(0, 3, 3, 3, 0);
   
$i->save('F', 'test3971.ico');
?>