Exemplo n.º 1
0
    define('DEFAULT_S', 0);
}
if (!defined('DEFAULT_CC')) {
    define('DEFAULT_CC', 'ffffff');
}
if (!defined('DEFAULT_WIDTH')) {
    define('DEFAULT_WIDTH', 100);
}
if (!defined('DEFAULT_HEIGHT')) {
    define('DEFAULT_HEIGHT', 100);
}
if (!defined('IMG_BASE_DIRECTORY')) {
    define('IMG_BASE_DIRECTORY', 'E:/works/marketing/Uploads/');
}
// usage
echo thumbpic::start(array('src' => 'wm/1/55cb1aba04959.jpg', 'new_width' => 300));
class thumbpic
{
    protected $src = "";
    protected $docRoot = "";
    protected $lastURLError = false;
    protected $localImage = "";
    protected $localImageMTime = 0;
    protected $url = false;
    protected $myHost = "";
    protected $cachefile = '';
    protected $errors = array();
    protected $cacheDirectory = '';
    protected $startTime = 0;
    protected $lastBenchTime = 0;
    protected $cropTop = false;
Exemplo n.º 2
0
Arquivo: index.php Projeto: a9r/Class
function thumbpic($src, $width = 0, $height = 0)
{
    thumbpic::start(array('src' => $src, 'new_width' => $width, 'new_height' => $height));
}