Fonction:problème Modifier la taille() de CodeIgniter
function do_upload() {
$config = array(
'allowed_types' => 'jpg|jpeg|gif|png',
'upload_path' => $this->gallery_path,
'max_size' => 2000
);
$this->load->library('upload', $config);
$this->upload->do_upload();
$image_data = $this->upload->data();
$config = array(
'image_library' => 'gd2',
'source_image' => $image_data['full_path'],
'new_image' => $this->gallery_path . '/thumbs',
'maintain_ratio' => TRUE,
'width' => 150,
'height' => 267
);
$this->load->library('image_lib', $config);
if (! $this->image_lib->resize())
{
echo $this->image_lib->display_errors();
}
$this->image_lib->clear();
}
et donne une page blanche, ne pas les erreurs d'affichage. Mais si j'efface ces lignes, ça marche bien!
'maintain_ratio' => TRUE,
'width' => 150,
'height' => 26
Le problème était que l'image utilisée était avec l'extension .JPG en majuscule. – Mango