07-06-2011, 09:32 PM
Very nice!
I seen u write there that u wanted to display the icons of a item also.
if u use this as GD image then u will.
All u have to do is convert the ItemBtn*.tex files to jpg/gif/png
// Create image instances
$src = imagecreatefromgif(ItemBtn.$_GET[i]..gif);
$dest = imagecreatetruecolor(32, 32);
$row_start = $_GET[r] * 32;
$row_end = $row_start + 32;
$col_start = $_GET[c] * 32;
$col_end = $col_start + 32;
// Copy
imagecopy($dest, $src, 0, 0, $col_start, $row_start, $col_end, $row_end);
// Output and free from memory
header(Content-Type: image/gif);
imagegif($dest);
imagedestroy($dest);
imagedestroy($src);
?>
Then u can just get the icon with
This will display icon id 0 (ItemBtn0)
Row 0 , Column 0 (gold coin icon)
The values are in the t_item database

