/** * Function: convertFile * * Creates the image for the given display XML file. */ static function convertFile($filename, $background = null) { $viewReader = new mxGraphViewImageReader($background); $viewReader->readFile($filename); $image = $viewReader->canvas->getImage(); return $image; }