views:

106

answers:

1

Function:

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();

}

And gives a white page, dont display errors. But if I erase this lines, works fine!

'maintain_ratio' => TRUE,
'width' => 150,
'height' => 26   
A: 

Does your system have the gd2 library installed?

Is there anything in the log files?

someoneinomaha
The problem was that the image I was used are with the extension .JPG in uppercase.
Mango