PHP Classes

pixpic: Render images in the browser using color DIV tags

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 63%Total: 196 All time: 8,503 This week: 190Up
Version License PHP version Categories
pixpic 0.5GNU General Publi...5.0Graphics
Description 

Author

This class can render images in the browser using color DIV tags.

It can open a given image file and render it as HTML div tags of 1 pixel of size with background color set to the respective pixel in the image.

The image may be scale with a given zoom level by increasing the size of the DIV tags.

The class can also extract the palette of colors used in the image into an array.

Innovation Award
PHP Programming Innovation award nominee
January 2016
Number 5


Prize: One ebook of choice by Packt
Useful PHP class that can render images as HTML when images are being blocked.

Manuel Lemos
Picture of Miguel
  Performance   Level  
Name: Miguel <contact>
Classes: 2 packages by
Country: Venezuela Venezuela
Age: 47
All time rank: 353714 in Venezuela Venezuela
Week rank: 312 Up2 in Venezuela Venezuela Up
Innovation award
Innovation award
Nominee: 2x

Recommendations

Detect edge of foot area in image
Process image of foot of diabetic patient

Example

<style>
    .imgPixpic{display:block;margin-bottom:20px;}
</style>
<?php

include "pixpic.class.php";
$px=new Pixpic();
$img="./elephpant.png";
//Set the image
$px->setImage($img);
//set property zoom =1 original size span=1 not separated
$px->zoom=1;
$px->span=1;
$pro=$px->getProperty();
if(!
$px->error()){
    echo
$px->image2div();
    echo
$px->image2siluet("000000");
    echo
$px->image2alpha("000000");
    echo
"<p>Attributes Image:</p>";
    echo
"<p>Width:".$pro[0]."</p>";
    echo
"<p>Height:".$pro[1]."</p>";
    echo
"<p>Bits:".$pro["bits"]."</p>";
    echo
"<p>Type:".$pro["mime"]."</p>";
}else{
    echo
$px->error();
}


?>


  Files folder image Files  
File Role Description
Plain text file pixpic.class.php Class file class
Accessible without login Image file elephpant.png Photo example image
Accessible without login Image file emo.png Photo image example
Accessible without login Plain text file example1.php Example basic example
Accessible without login Plain text file example2.php Example example colors palete
Accessible without login Plain text file example3.php Example example property

 Version Control Unique User Downloads Download Rankings  
 0%
Total:196
This week:0
All time:8,503
This week:190Up
User Ratings User Comments (1)
 All time
Utility:91%StarStarStarStarStar
Consistency:91%StarStarStarStarStar
Documentation:-
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:63%StarStarStarStar
Rank:828
 
Funy but usefull
8 years ago (Pomirol Alain)
70%StarStarStarStar