2017 © Pedro Peláez
 

library favicon

Class generation favicon for browsers and devices Android, Apple, Windows and display of html code. It supports a large number of settings such as margins, color, compression, three different methods of crop and screen orientation.

image

dmamontov/favicon

Class generation favicon for browsers and devices Android, Apple, Windows and display of html code. It supports a large number of settings such as margins, color, compression, three different methods of crop and screen orientation.

  • Wednesday, July 22, 2015
  • by dmamontov
  • Repository
  • 3 Watchers
  • 36 Stars
  • 226 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 4 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

Latest Stable Version License Total Downloads PHP Classes, (*1)

Favicon Generator

This class can create Favicon images for sites and mobile devices., (*2)

It takes a give base icon image and creates multiple versions of the image for use as favicon on Web sites or be displayed by mobile devices like those using systems of Apple, Microsoft, and Android., (*3)

The class can generate all the versions of the icon images with the different sizes, as well the necessary HTML to reference the icon images in a Web page., (*4)

The margins, color, compression, crop method and screen orientation are configurable parameters., (*5)

Requirements

  • PHP version ~5.3.3
  • Module installed Imagick

Installation

1) Install composer, (*6)

2) Follow in the project folder:, (*7)

composer require dmamontov/favicon ~1.0.0

In config composer.json your project will be added to the library dmamontov/favicon, who settled in the folder vendor/. In the absence of a config file or folder with vendors they will be created., (*8)

If before your project is not used composer, connect the startup file vendors. To do this, enter the code in the project:, (*9)

require 'path/to/vendor/autoload.php';

Example of work

$fav = new FaviconGenerator(__DIR__ . '/tests.png');

$fav->setCompression(FaviconGenerator::COMPRESSION_VERYHIGH);

$fav->setConfig(array(
    'apple-background'    => FaviconGenerator::COLOR_BLUE,
    'apple-margin'        => 15,
    'android-background'  => FaviconGenerator::COLOR_GREEN,
    'android-margin'      => 15,
    'android-name'        => 'My app',
    'android-url'         => 'http://slobel.ru',
    'android-orientation' => FaviconGenerator::ANDROID_PORTRAIT,
    'ms-background'       => FaviconGenerator::COLOR_GREEN,
));

echo $fav->createAllAndGetHtml();

The Versions

22/07 2015

dev-master

9999999-dev http://www.slobel.ru/

Class generation favicon for browsers and devices Android, Apple, Windows and display of html code. It supports a large number of settings such as margins, color, compression, three different methods of crop and screen orientation.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Dmitry Mamontov

apple windows android generation favicon browsers

01/07 2015

1.0.0

1.0.0.0 http://www.slobel.ru/

Class generation favicon for browsers and devices Android, Apple, Windows and display of html code. It supports a large number of settings such as margins, color, compression, three different methods of crop and screen orientation.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Dmitry Mamontov

apple windows android generation favicon browsers