|
Showing ico file on website |
|
|
|
|
Written by Administrator
|
|
Monday, 16 April 2007 |
It was a little surprise for me finding that ico file cannot automatically show on html. The earlier way to solve this, I manually convert ico to jpg or gif. But that manual way was not reliable since I want to show many collections of ico files in my website www.mixedforyou.com/icon3d. Yes, I found a class that convert ico files and this class have function more than I expected.
Again, I found great classes from phpclasses.org. The classes are class.ico.php and class.icothumb.php that made by Diogo Resende. The class.ico.php used in class.icothumb.php. I use this last class for creating png file from ico file. The generated png file will show all available dimension of the icon, just like the green ladybug picture above.
With that class, I wrote code like this to convert and show the icon file
$ico = new IcoThumb($icofile);
$ico->max_size = 128;
$ico->use_diferent_depths = false;
$ico->GetThumb(4,$saveas);
echo "<img src='$saveas'>";
and this is another example generated file from ico file:

|
|
Last Updated ( Monday, 16 April 2007 )
|
Kuliah TKI - Blog da...
mm Apparently, 21,000 boots imported by
Clas-class php yang ...
mm Apparently, 21,000 boots imported by
Kuliah TK Internet :...
mm Apparently, 21,000 boots imported by
The Power of GIS - U...
mm Apparently, 21,000 boots imported by
Kuliah TK Internet :...
mm Apparently, 21,000 boots imported by
JPGraph - membuat gr...
timberland - mm Apparently, 21,000 bo...
Kuliah TKI : Ajax - ...
mm Apparently, 21,000 boots imported by
Banner spesial untuk...
mm Apparently, 21,000 boots imported by