예제 #1
0
        $i++;
    }
    header('content-type: ', 'image/gif');
    //http://in.php.net/manual/en/function.header.php
    imagegif($img);
    //http://in.php.net/manual/en/function.imagegif.php
    imagedestroy($img);
    //http://in.php.net/manual/en/function.imagedestroy.php
    return true;
}
if (loginMySQL()) {
    // Corpo
    $s = loadSprite('spr/oboro.spr');
    drawImage($s, $_GET['frame'], 0, 0, 0, 0);
    // Cabeça
    $s = loadSprite('spr/cabelo.spr');
    drawImage($s, $_GET['frame'], 1, 0, 0, 0);
    //IMPLEMENTAR AS COISAS DE CADA UM VER ULTIMOS LOG'S DA CONVERSA COM O WAP
    /*
    // Equip Top
    drawImage($s, $_GET['frame'], 0, 0, 0);
    
    // Equip Mid
    drawImage($s, $_GET['frame'], 0, 0, 0);
    
    // Equip Low
    drawImage($s, $_GET['frame'], 0, 0, 0);
    
    // Equip Costume Capa
    drawImage($s, $_GET['frame'], 0, 0, 0);
    */
예제 #2
0
        $b = ord($image['data'][$i]);
        //http://in.php.net/manual/en/function.ord.php
        if ($b == 0) {
            /* 
            Tratamento dos bytes 00 que estão comprimidos com RLE 
            */
            $i++;
            $dest = $p + ord($image['data'][$i]);
            $color = imagecolorallocatealpha($img, $sprite['palette'][0]['r'], $sprite['palette'][0]['g'], $sprite['palette'][0]['b'], $sprite['palette'][0]['a']);
            //http://in.php.net/manual/en/function.imagecolorallocatealpha.php
            for ($p; $p < $dest; $p++) {
                imagesetpixel($img, $p % $image['width'], $p / $image['width'], $color);
            }
        } else {
            $color = imagecolorallocatealpha($img, $sprite['palette'][$b]['r'], $sprite['palette'][$b]['g'], $sprite['palette'][$b]['b'], $sprite['palette'][$b]['a']);
            imagesetpixel($img, $p % $image['width'], $p / $image['width'], $color);
            //http://in.php.net/manual/en/function.imagesetpixel.php
            $p++;
        }
        $i++;
    }
    header('content-type: ', 'image/gif');
    //http://in.php.net/manual/en/function.header.php
    imagegif($img);
    //http://in.php.net/manual/en/function.imagegif.php
    imagedestroy($img);
    //http://in.php.net/manual/en/function.imagedestroy.php
    return true;
}
$s = loadSprite('spr/' . $_GET['im'] . '.spr');
drawImage($s, $_GET['id']);