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;
    }