PHP Classes

pixpic: Render images in the browser using color DIV tags

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 63%Total: 198 All time: 8,502 This week: 46Up
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: 48
All time rank: 354614 in Venezuela Venezuela
Week rank: 195 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 (6)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:198
This week:0
All time:8,502
This week:46Up
User Ratings User Comments (1)
 All time
Utility:91%StarStarStarStarStar
Consistency:91%StarStarStarStarStar
Documentation:-
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:63%StarStarStarStar
Rank:838
 
Funy but usefull
9 years ago (Pomirol Alain)
70%StarStarStarStar