This commit is contained in:
coderkun 2015-04-30 18:50:27 +02:00
commit 50c38e0efa
9 changed files with 966 additions and 89 deletions

View file

@ -580,7 +580,6 @@
}
/**
* Copy Achievement media.
*
@ -602,6 +601,32 @@
$userId
);
}
/**
* Gather some information about a Seminary medium.
*
* The infos are organized in an associative array and contain the
* following keys: width and height
*
* @param int $seminarymediaId ID of Seminary media to get infos for
* @return array List of infos for Seminary medium
*/
public function getSeminarymediaInfos($seminarymediaId)
{
// Create filename
$filename = ROOT.DS.\nre\configs\AppConfig::$dirs['seminarymedia'].DS.$seminarymediaId;
// Get infos
$infos = array();
$im = new \Imagick($filename);
$infos['width'] = $im->getImageWidth();
$infos['height'] = $im->getImageHeight();
// Return infos
return $infos;
}