/** * Determine output MIME type * Returns the MIME type that the transformation will output. * * @param string $fileIn File that should deal as input for the transformation. * @param string $mimeIn Specify the MIME type, so method does not need to. * * @return string MIME type the transformation will output. * * @throws ezcImageAnalyzerException If the input type is unsupported. */ public function getOutMime($fileIn, $mimeIn = null) { if (!isset($mimeIn)) { $analyzer = new ezcImageAnalyzer($fileIn); $mimeIn = $analyzer->mime; } $mimeOut = $this->converter->getMimeOut($mimeIn); // Is output type allowed by this transformation? Else use first allowed one... return in_array($mimeOut, $this->mimeOut) ? $mimeOut : reset($this->mimeOut); }