开发者

Codeigniter Blue Hue

开发者 https://www.devze.com 2023-02-28 08:35 出处:网络
UPDATE: THE ANSWER IS USE THE GD2 LIBRARY, DOH! I am working with Codeigniter\'s image manipulation library to resize some photos. Unfortunately, they are producing a blue tint or hue to the photos.

UPDATE: THE ANSWER IS USE THE GD2 LIBRARY, DOH!

I am working with Codeigniter's image manipulation library to resize some photos. Unfortunately, they are producing a blue tint or hue to the photos. Not sure why this is and needed to see if it was something I am doing. Here is the code I am using to create the thumb's. 开发者_如何转开发Let me know if you want to see image links, and I will upload them somewhere.

$this->load->library('image_lib');
$config['image_library'] = 'GD';
$config['source_image'] ="images/IMG_0007.jpg";
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = '450';
$config['height'] = '450';

$this->image_lib->initialize($config);

if(!$this->image_lib->resize())
{
   echo $this->image_lib->display_errors();
}


I strongly recommend you to use ImageMagick for image resizing. It respects color profiles, is slightly faster, less memory hungry and generally produces better quality. See this question:

How to stop GD2 from washing away the colors upon resizing images?

If you do not have ImageMagick installed, this may be of help:

http://ferdychristant.com/blog//archive/DOMM-8GAFGL

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号