protected function determineOutputFormat($pathToImage)
    {
        $outputFormat = pathinfo($pathToImage, PATHINFO_EXTENSION);

        if ($this->outputFormat != '') {
            $outputFormat = $this->outputFormat;
        }

        $outputFormat = strtolower($outputFormat);

        if (! $this->isValidOutputFormat($outputFormat)) {
            $outputFormat = 'jpg';
        }

        return $outputFormat;
    }
protected function determineOutputFormat($pathToImage)
    {
        $outputFormat = pathinfo($pathToImage, PATHINFO_EXTENSION);

        if ($this->outputFormat != '') {
            $outputFormat = $this->outputFormat;
        }

        $outputFormat = strtolower($outputFormat);

        if (! $this->isValidOutputFormat($outputFormat)) {
            $outputFormat = 'jpg';
        }

        return $outputFormat;
    }
protected function determineOutputFormat ( $ pathToImage ) { $ outputFormat = pathinfo ( $ pathToImage , PATHINFO_EXTENSION ) ; if ( $ this -> outputFormat != '' ) { $ outputFormat = $ this -> outputFormat ; } $ outputFormat = strtolower ( $ outputFormat ) ; if ( ! $ this -> isValidOutputFormat ( $ outputFormat ) ) { $ outputFormat = 'jpg' ; } return $ outputFormat ; }
Determine in which format the image must be rendered.

@param $pathToImage

@return string
Determine in which format the image must be rendered .