Exemplo n.º 1
0
function wiziapp_getImageUrl()
{
    $width = $_GET['width'];
    //if ($width == 0 || $width == '') {
    //        $width = $_GET['wiziapp/content/list/getimage?width'];
    //    }
    $image = new WiziappImageHandler($_GET['url']);
    $image->wiziapp_getResizedImage($width, $_GET['height'], $_GET['type'], $_GET['allow_up']);
}
Exemplo n.º 2
0
function wiziapp_processImageForThumb($src, $size, $limitSize)
{
    $showedImage = FALSE;
    if (!empty($src)) {
        $image = new WiziappImageHandler($src);
        // The original image
        $image->load();
        $width = $image->getNewWidth();
        $height = $image->getNewHeight();
        if (intval($width) >= $limitSize['width'] && intval($height) >= $limitSize['height']) {
            if (intval($width) >= $size['width'] * 0.8 && intval($height) >= $size['height'] * 0.8) {
                //$imageUrl = $image->getResizedImageUrl($src, $size['width'], $size['height'], 'adaptiveResize', true);
                $image->wiziapp_getResizedImage($size['width'], $size['height'], 'adaptiveResize', true);
                $showedImage = TRUE;
            }
        }
    }
    return $showedImage;
}