Rev 661 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php
Class imageProvider extends Cel {
function getElement($uid){
if(!isset($uid[0])) {
return;
}
$id_image = $uid[0];
$format = 'temp';
if(isset($_GET['format'])) {
$format = $_GET['format'];
}
if(isset($_GET['dimensions'])) {
$dimensions = $_GET['dimensions'];
} else {
if(isset($this->config['cel_db']['format_'.$format])) {
$dimensions = $this->config['cel_db']['format_'.$format];
}
}
$this->config['cel_db']['format_'.$format] = $dimensions;
$generateur_image = new ImageRecreation($this->config);
$infos_image = $generateur_image->obtenirImageEtInfosPourId($id_image);
if(!$infos_image) {
header('HTTP/1.0 404 Not Found');
exit;
}
$image_generee = $generateur_image->creerMiniatureImageSelonFormat($infos_image, $format);
header('Content-type: image/jpeg');
imagejpeg($image_generee);
exit;
}
private function estUneImageALaDemande() {
}
}
?>