source/Core/UtilsPic.php
protected function _resize($aImageInfo, $sSrc, $hDestinationImage, $sTarget, $iNewWidth, $iNewHeight, $iGdVer, $blDisableTouch, $iDefQuality)
    {
        startProfile("PICTURE_RESIZE");

        $blSuccess = false;
        switch ($aImageInfo[2]) { //Image type
            case ($this->_aImageTypes["GIF"]):
                //php does not process gifs until 7th July 2004 (see lzh licensing)
                if (function_exists("imagegif")) {
                    $blSuccess = resizeGif($sSrc, $sTarget, $iNewWidth, $iNewHeight, $aImageInfo[0], $aImageInfo[1], $iGdVer);
                }
                break;
            case ($this->_aImageTypes["JPEG"]):
            case ($this->_aImageTypes["JPG"]):
                $blSuccess = resizeJpeg($sSrc, $sTarget, $iNewWidth, $iNewHeight, $aImageInfo, $iGdVer, $hDestinationImage, $iDefQuality);
                break;
            case ($this->_aImageTypes["PNG"]):
                $blSuccess = resizePng($sSrc, $sTarget, $iNewWidth, $iNewHeight, $aImageInfo, $iGdVer, $hDestinationImage);
                break;
        }

        if ($blSuccess && !$blDisableTouch) {
            @touch($sTarget);
        }

        stopProfile("PICTURE_RESIZE");

        return $blSuccess;
    }
protected function _resize($aImageInfo, $sSrc, $hDestinationImage, $sTarget, $iNewWidth, $iNewHeight, $iGdVer, $blDisableTouch, $iDefQuality)
    {
        startProfile("PICTURE_RESIZE");

        $blSuccess = false;
        switch ($aImageInfo[2]) { //Image type
            case ($this->_aImageTypes["GIF"]):
                //php does not process gifs until 7th July 2004 (see lzh licensing)
                if (function_exists("imagegif")) {
                    $blSuccess = resizeGif($sSrc, $sTarget, $iNewWidth, $iNewHeight, $aImageInfo[0], $aImageInfo[1], $iGdVer);
                }
                break;
            case ($this->_aImageTypes["JPEG"]):
            case ($this->_aImageTypes["JPG"]):
                $blSuccess = resizeJpeg($sSrc, $sTarget, $iNewWidth, $iNewHeight, $aImageInfo, $iGdVer, $hDestinationImage, $iDefQuality);
                break;
            case ($this->_aImageTypes["PNG"]):
                $blSuccess = resizePng($sSrc, $sTarget, $iNewWidth, $iNewHeight, $aImageInfo, $iGdVer, $hDestinationImage);
                break;
        }

        if ($blSuccess && !$blDisableTouch) {
            @touch($sTarget);
        }

        stopProfile("PICTURE_RESIZE");

        return $blSuccess;
    }
protected function _resize ( $ aImageInfo , $ sSrc , $ hDestinationImage , $ sTarget , $ iNewWidth , $ iNewHeight , $ iGdVer , $ blDisableTouch , $ iDefQuality ) { startProfile ( "PICTURE_RESIZE" ) ; $ blSuccess = false ; switch ( $ aImageInfo [ 2 ] ) { //Image type case ( $ this -> _aImageTypes [ "GIF" ] ) : //php does not process gifs until 7th July 2004 (see lzh licensing) if ( function_exists ( "imagegif" ) ) { $ blSuccess = resizeGif ( $ sSrc , $ sTarget , $ iNewWidth , $ iNewHeight , $ aImageInfo [ 0 ] , $ aImageInfo [ 1 ] , $ iGdVer ) ; } break ; case ( $ this -> _aImageTypes [ "JPEG" ] ) : case ( $ this -> _aImageTypes [ "JPG" ] ) : $ blSuccess = resizeJpeg ( $ sSrc , $ sTarget , $ iNewWidth , $ iNewHeight , $ aImageInfo , $ iGdVer , $ hDestinationImage , $ iDefQuality ) ; break ; case ( $ this -> _aImageTypes [ "PNG" ] ) : $ blSuccess = resizePng ( $ sSrc , $ sTarget , $ iNewWidth , $ iNewHeight , $ aImageInfo , $ iGdVer , $ hDestinationImage ) ; break ; } if ( $ blSuccess && ! $ blDisableTouch ) { @ touch ( $ sTarget ) ; } stopProfile ( "PICTURE_RESIZE" ) ; return $ blSuccess ; }
type dependant image resizing

@param array  $aImageInfo        Contains information on image's type / width / height
@param string $sSrc              source image
@param string $hDestinationImage Destination Image
@param string $sTarget           Resized Image target
@param int    $iNewWidth         Resized Image's width
@param int    $iNewHeight        Resized Image's height
@param mixed  $iGdVer            used GDVersion, if null or false returns false
@param bool   $blDisableTouch    false if "touch()" should be called for gif resizing
@param string $iDefQuality       quality for "imagejpeg" function

@return bool
type dependant image resizing