Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Codeigniter Blue Hue

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();
}
like image 840
Nathan Stanford II Avatar asked Aug 29 '26 11:08

Nathan Stanford II


1 Answers

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

like image 151
Fer Avatar answered Aug 31 '26 02:08

Fer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!