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.
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>';