A CLI tool written in PHP that generates a sprite image file from the selected pictures.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mirro-san 430755367d added readme 9 months ago
README.md added readme 9 months ago
css_generator update 9 months ago




A tool written in PHP that allows you to generate sprite images along with their css.

Code Samples

function glob_recursive($base, $pattern, $flags = 0)
    if (substr($base, -1) !== DIRECTORY_SEPARATOR) {
        $base .= DIRECTORY_SEPARATOR;

    $files = glob($base . $pattern, $flags);

    foreach (glob($base . '*', GLOB_ONLYDIR | GLOB_NOSORT | GLOB_MARK) as $dir) {
        $dirFiles = glob_recursive($dir, $pattern, $flags);
        if ($dirFiles !== false) {  
            $files = array_merge($files, $dirFiles);

    return $files;


PHP 7 and GD are required.