Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP code to generate icons

currently i am working on a huge back-end application in Zend Framework. A lot of times i end up using wrong icon for some object or action.

My Question Is there any php code to generate icons automatically????

Ofcourse these icons will not be generated magically, best case scenario is that we have a collection of icons which have the type of.

  • Object (user,category,product,rss etc)
  • Action (add,edit,delete,update etc)

This way we can create icons by mixing different types of icons on the fly.

The code for generating a icon to delete user with 32x32 and delete icon in bottom-right corner of the icon.

$icon = new Icon();
$icon->object('user')->action('delete');
$icon->action_align('right')->action_valign('bottom');
$icon->action_height(10)->action_width(10);
$icon->height(32)->width(32);
$icon->create();

This is just an example that how can we create a icon which was never exited before.

like image 642
Imran Naqvi Avatar asked Oct 14 '22 20:10

Imran Naqvi


1 Answers

You can use GD library to export the images, not in the .ico format but a .bmp will be ok. With Imagick it seems you can do directly .ico files.

like image 92
Elzo Valugi Avatar answered Oct 18 '22 01:10

Elzo Valugi