SkillAgentSearch skills...

Image2css

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

Install / Use

/learn @jaysalvat/Image2css
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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

View on GitHub
GitHub Stars716
CategoryDevelopment
Updated3d ago
Forks92

Languages

PHP

Security Score

80/100

Audited on Mar 30, 2026

No findings