下面是我用来将调整后的图像动态输出到浏览器的代码。它可以正常使用PNG图像,但不能处理jpg图像。你们可以帮帮我吗? / p>
$config['image_library'] = 'gd2';
$config['source_image'] = UPLOADS.'photos/3215_1411975688.jpg';
$config['width'] = '100';
$config['height'] = '100';
$config['dynamic_output'] = TRUE;
$this->load->library('image_lib');
$this->image_lib->initialize($config);
if (!$this->image_lib->resize()) {
echo $this->image_lib->display_errors();
}