public function convert($format, $file)
    {
        $file = ltrim($file, '/');
        $this->checkImage($file);

        return $this->wrapper->run("convert", $this->getWebDirectory() . '/' . $file, $this->convertFormat($format), $this->getCacheDirectory() . '/' . $this->pathify($format) . '/' . $file);
    }