Welcome Guest, Not a member yet? Register   Sign In
The image cannot be displayed because it contains errors.
#1

PHP Code:
<?php
class Image extends CI_Controller {
 public function 
index()
 {
 
$this->load->library('image_lib');
 
$config['image_library'] = 'gd2';
 
$config['source_image'] = '1.jpg';
 
$config['dynamic_output'] = TRUE;
 
$config['make_thumb'] = FALSE;
 
$config['quality'] = '100%';
 
$config['width'] = 800;
 
$config['height'] = 500;
 
$config['maintain_ratio'] = TRUE;
 
$config['master_dim'] = 'auto';
 
$this->image_lib->initialize($config);
 
 if(! 
$this->image_lib->resize())
 {
 print 
$this->image_lib->display_errors();
 }

 }

}
?>
The image is there. Headers are not sent. Google is flooded with this question and no where, no one has answered. If Dynamic Output is False i can do everything as I want. I need it to be TRUE.

Do you have any idea what can cause this?
Reply
#2

On localhost, on XAMPP, it works... Maybe you should provide more info.
Reply
#3

Try to call also the crop function before your resize fuction:

PHP Code:
...
$this->image_lib->crop();
if(! 
$this->image_lib->resize())
... 

Reply




Theme © iAndrew 2016 - Forum software by © MyBB