コード例 #1
0
ファイル: testImagen.php プロジェクト: pabloaltam/cikapp-web
<?php

include_once './include/thumb.php';
$mythumb = new thumb();
$mythumb->loadImage('uploads/book82.jpg');
//$mythumb->resize(100, 'width');
$mythumb->crop(200, 150, "top");
$mythumb->save("test.jpg");
$mythumb->show();
コード例 #2
0
ファイル: funciones_php.php プロジェクト: JBarretoY/SICDAP
function pruebaresize($url, $filename, $w, $h, $sel_width, $sel_height, $sel_x, $sel_y)
{
    $len = strlen($filename);
    $pos = strripos($filename, ".");
    $ext = strtolower(substr($filename, ($len - $pos - 1) * -1));
    $base = substr($filename, 0, $pos);
    $newImage = $base . "-" . $w . "x" . $h . "." . $ext;
    $mythumb = new thumb();
    $mythumb->loadImage($url . $filename);
    $mythumb->crop($sel_width, $sel_height, $sel_x, $sel_y);
    $mythumb->save($url . $newImage);
    $mythumb = new thumb();
    $mythumb->loadImage($url . $newImage);
    $mythumb->resize($h, 'height');
    $mythumb->save($url . $newImage);
}