Hello! This is my first post. I hope I'll be able to share my scripts with you soon! But I'll start differently - external tool for generating custom 16x16 ICO files.
Link
mini.krzysiu.net/icon-generator/
Introduction
Please, please, please! If you like it, if you used at least one icon in your project, I'd be veeery grateful to hear anything from you! You know, I'm doing it as FLOSS for people, so my reward is the feedback
At first I want to tell you that I'm busy man, so my project is right now only in Polish yet you don't need to know Polish to use it. I want to share it right now and if you'd like it, I'll try to translate it next week. If you'd be like "meh", I'll still translate it, but a bit later
Requirements, license etc.
You need modern browser to use it. Opera, Firefox and Google Chrome will do well. I use Piwik statistics (visit time, browser, country etc.) - just because my curiosity, I'm not sharing it with any 3rd party. There's no adverts. There's no HTTPS connection. Generated icons are either on GPL, CC-0, they can be public domain as well. Choose the way that fits you and your local law (PD doesn't work in some countries).
What's that? What does it do?
As many of you, I'm using my own AHK scripts. I needed different icons. I wrote icon generator to be able to add to every script custom icon. It created 3D alike icon with short label. The tool allows you to configure a few things:
- Ikona/kolor - color of the background (click on color box, choose color, click on "wybierz")
- Tekst/tekst - label on the icon (if there's no character you want to use, choose other font; I recommend max 3 chars)
- Tekst/kolor - color of the text
- Tekst/krój - font face - dropdown menu with preview (click on [pokaż informacje o czcionkach] to get more info about these fonts; if you know some font on SIL license, which fits there, tell me!)
- Tekst/rozmiar - font size - I recommend about 10-12 px
Future feautres
* Translation (anybody would help me with other languages than English? There's max 20 phrases, most of them aren't longer than word or two; please tell if you'd, I'll send you phrases).
* More icon sizes (32,32, 64x64... Anything more?)
* Local version (I've it already working; it generates icons on the fly and caches it), but it needs ImageMagick _binaries_ and PHP. Do you want it? Maybe somebody would rewrite it to IM DLL and no PHP?
* API (only if somebody would want it)
Source code
Tell me if you want it and I'll send it to Github.
(very) Technical details
The core is written in PHP. It uses Imagemagick to generate icons (IMagick extension). The icon is made of 3 layers:
1. First layer is PNG file embedded in base64 - rounded square - which is colored
2. Second layer is shading and border - semi-transparent PNG in base64
3. Third layer is generated - label
1st and 2nd layer is SVG drawn in Inkscape and converted to PNG, then sent thought 3 tools to minimize PNG size.
The tool merges 3 layers and generates ico file in base64. PHP sends it to browser and browser displays it. Nothing is saved on the server. Downloading of icon is possible by modern function - a href without file - base64 as well.
HTML is generated with Smarty. Smarty uses my FontAwesome plugin, which I'll share soon on GitHub - one of my best works, at least in my opinion. It can be easily rewritten to pure PHP/Wordpress plugin etc. HTML5 is supported by CSS3 and jQuery. Dropdown with font preview is custom jQuery widget based on jQueryUI one.