Skip to content
Projects

jaysalvat/image2css has 711 GitHub stars and 91 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 19:23 UTC. Last push 2026-02-14.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

Pointless PHP class to convert image to CSS box-shadow property.

Developer Tools

README.md

Original

Image To CSS Converter

Latest Stable Version License

You suck at CSS but want to impress your friends anyway? This PHP class converts an image to thousands of CSS lines of box-shadow properties.

Demo:

You can see a demonstration on CodePen.io.

http://codepen.io/jaysalvat/pen/HaqBf

Installation:

Create a composer.json file with:

{
   "require": {
       "jaysalvat/image2css": "~1.0"
   }
}

And run Composer to install Image2Css.

$ curl -sS https://getcomposer.org/installer | php
$ composer.phar install

Example:

$img = new \Image2Css\Converter("monalisa.jpg");
$img->setWidth(200);
$img->setPixelSize(4);
$img->setBlur(4);

echo $img->computeStyle();

Note:

GD extension required.

http://www.php.net/manual/en/book.image.php