Пример #1
0
function carrega_recursos_cabecalho()
{
    // codigo html
    $codigo_html .= fancybox();
    $codigo_html .= jcrop();
    // retorno
    return $codigo_html;
}
Пример #2
0
// require("fs_folders/php_functions/library.php");
// require("fs_folders/php_functions/source.php");
// $mc = new myclass();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    # allow crop image size is 210 by 210;
    // $img_src = 'fs_folders/images/uploads/member/pp.jpg';
    $img_src = 'pool.jpg';
    $img_dst = 'jesus.jpg';
    $nw = 237;
    $nh = 237;
    $cx = $_POST['x'];
    $cy = $_POST['y'];
    $cw = $_POST['w'];
    $ch = $_POST['h'];
    // echo " jcrop( $img_src , $img_dst , $nw , $nh , $cx , $cy , $cw , $ch ) ";
    jcrop($img_src, $img_dst, $nw, $nh, $cx, $cy, $cw, $ch);
}
function jcrop($img_src, $img_dst, $nw, $nh, $cx, $cy, $cw, $ch)
{
    header('Content-type: image/jpeg');
    $jpeg_quality = 100;
    $img_r = imagecreatefromjpeg($img_src);
    $dst_r = ImageCreateTrueColor($nw, $nh);
    imagecopyresampled($dst_r, $img_r, 0, 0, $cx, $cy, $nw, $nh, $cw, $ch);
    // imagejpeg( $dst_r , $img_dst , $jpeg_quality );
    imagejpeg($dst_r, null, $jpeg_quality);
    // header("location:account");
}
// If not a POST request, display page below:
?>
<!DOCTYPE html>
Пример #3
0
function carrega_recursos_cabecalho()
{
    $codigo_html .= fancybox();
    $codigo_html .= jcrop();
    return $codigo_html;
}