public function convert($img, $outputFormat, $targetPath, $quality = null)
    {
        ImageFile::save(
            $targetPath,
            ImageFile::get($img),
            ImageFile::getType($img, $outputFormat),
            $quality
        );
    }
public function convert($img, $outputFormat, $targetPath, $quality = null)
    {
        ImageFile::save(
            $targetPath,
            ImageFile::get($img),
            ImageFile::getType($img, $outputFormat),
            $quality
        );
    }
public function convert ( $ img , $ outputFormat , $ targetPath , $ quality = null ) { ImageFile :: save ( $ targetPath , ImageFile :: get ( $ img ) , ImageFile :: getType ( $ img , $ outputFormat ) , $ quality ) ; }
Convert image to given format
@param string $img
@param string $outputFormat
@param string $targetPath
@param null|int $quality
Convert image to given format