示例#1
0
    }
}
if (trim($_GET["TIPOIMAGEM"]) != "" && trim($_GET["TIPOIMAGEM"]) != "nenhum") {
    if ($img->imagepath == "") {
        echo "Erro IMAGEPATH vazio";
        exit;
    }
    $nomer = $img->imagepath . "filtroimgtemp" . nomeRand() . ".png";
    $img->saveImage($nomer);
    //
    //corta a imagem gerada para voltar ao tamanho normal
    //
    if ($cortePixels > 0) {
        cortaImagemDisco($nomer, $cortePixels, 256);
    }
    filtraImg($nomer, trim($_GET["TIPOIMAGEM"]));
    $img = imagecreatefrompng($nomer);
    imagealphablending($img, false);
    imagesavealpha($img, true);
    ob_clean();
    echo header("Content-type: image/png \n\n");
    imagepng($img);
} else {
    if ($cache == true) {
        $nomer = salvaCacheImagem();
        carregaCacheImagem();
    } else {
        if ($_SESSION["i3georendermode"] == 0 || $_SESSION["i3georendermode"] == 1 && $cortePixels > 0) {
            $nomer = $img->imagepath . "temp" . nomeRand() . ".png";
            if ($img->imagepath == "") {
                ilegal();
示例#2
0
}
//nao usa o cache pois e necessario processar a imagem com alguma rotina de filtro
if ($_GET["TIPOIMAGEM"] != "" && $_GET["TIPOIMAGEM"] != "nenhum") {
    if ($img->imagepath == "") {
        echo "Erro IMAGEPATH vazio";
        exit;
    }
    $nomer = $img->imagepath . "filtroimgtemp" . nomeRand() . ".png";
    $img->saveImage($nomer);
    //
    //corta a imagem gerada para voltar ao tamanho normal
    //
    if ($cortePixels > 0) {
        cortaImagemDisco($nomer, $cortePixels, 256);
    }
    filtraImg($nomer, $_GET["TIPOIMAGEM"]);
    $img = imagecreatefrompng($nomer);
    imagealphablending($img, false);
    imagesavealpha($img, true);
    ob_clean();
    echo header("Content-type: image/png \n\n");
    imagepng($img);
    imagedestroy($img);
} else {
    if ($cache == true && $_GET["cache"] != "nao") {
        //cache ativo. Salva a imagem em cache
        $nomer = salvaCacheImagem($cachedir, $map_fileX, $_GET["tms"]);
        if ($_SESSION["i3georendermode"] == 2) {
            ob_clean();
            header('Cache-Control: public, max-age=22222222');
            header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 48 * 60 * 60) . ' GMT');