Шустрый

Профиль
Группа: Участник
Сообщений: 125
Регистрация: 25.6.2007
Где: UA
Репутация: нет Всего: 5
|
добрый день. Вопрос в следующем. Имею скрипт который формирует на основании строки в базе данных таблицу, 8х8. Ширина и высота ячейки 3px. Это некая иконка. Теперь стоит задача сохранить это цветное чудо в png. Так вот собственно вопрос, каким самым безболезненным способом можно сохранить эту цветную табличку в png. | Код | <table cellspacing="0" cellpadding="0" border="0" style="width: 24px; height: 24px;"> <tbody> <tr> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> </tr> <tr> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(140, 0, 255);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 138, 255);"></td> <td height="3" width="3" style="background-color: rgb(0, 138, 255);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(140, 0, 255);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> </tr> <tr> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(140, 0, 255);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 138, 255);"></td> <td height="3" width="3" style="background-color: rgb(0, 138, 255);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(140, 0, 255);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> </tr> <tr> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(140, 0, 255);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(255, 138, 0);"></td> <td height="3" width="3" style="background-color: rgb(255, 138, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(140, 0, 255);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> </tr> <tr> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(255, 138, 0);"></td> <td height="3" width="3" style="background-color: rgb(255, 138, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> </tr> <tr> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(255, 138, 0);"></td> <td height="3" width="3" style="background-color: rgb(255, 138, 0);"></td> <td height="3" width="3" style="background-color: rgb(255, 138, 0);"></td> <td height="3" width="3" style="background-color: rgb(255, 138, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> </tr> <tr> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(0, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> </tr> <tr> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> <td height="3" width="3" style="background-color: rgb(254, 0, 0);"></td> </tr> </tbody> </table>
|
|