Skip to content
/ I2G Public

I2G is for converting images to gradients. It does this by most of the colors used in the image. So, when you want to use lazy loading, it can show a good preview of the image being loaded.

Notifications You must be signed in to change notification settings

vahidei/I2G

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I2G

I2G is for converting images to gradients. It does this by most of the colors used in the image. So, when you want to use lazy loading, it can show a good preview of the image being loaded.

How to use

It's easy. Include the I2G.php file in your script.

  require('I2G.php');

Then create an instance of the class

  $i2g = new I2G(' /* Your image path */ ');

And then you can get the gradient code by calling the get_aa method

echo '<div style="margin-left:20px;
                  width:200px;
                  height:200px;
                  background:'. $i2g->getGradients() .';"></div>';

Preview

001.jpg

About

I2G is for converting images to gradients. It does this by most of the colors used in the image. So, when you want to use lazy loading, it can show a good preview of the image being loaded.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages