Welcome Guest, Not a member yet? Register   Sign In
Forgotten code line in Image Lib Example in User Guide, please correct
#1

[eluser]Unknown[/eluser]
Hello,

I've been reading (and using) your fantastic user guide, and when trying to use the example given in 'Processing an Image' in http://ellislab.com/codeigniter/user-gui...e_lib.html to create a thumb, I've found that a line is missed:

Code:
$config['image_library'] = 'gd2';
$config['source_image'] = '/path/to/image/mypic.jpg';
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width']  = 75;
$config['height'] = 50;

$this->load->library('image_lib', $config);

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

$this->image_lib->resize();

Please, add this line or when someone like me will try to copy and paste directly the example he or she won't be able of making the example work.

Thank you very much and have fun!!
#2

[eluser]PhilTem[/eluser]
A comment for the initialize()-method is missing in several library's documentations that I ran across. But if you know from one library that there is a initialize()-method then you can either assume that other libraries have such a method, too, or search the source code to ensure it.

However, if you want to have changes on either the CI source or the user-guide source, please post it as an issue on Codeigniter's GitHub Issue Tracker because the CI developers don't read the forums frequently.
#3

[eluser]Unknown[/eluser]
Hello Phil,

yes, I realize about it, but later (2 or 3 hours later, Big Grin) because I tested first my server, GD library, rewrite my code... I just wanted save someone's time improving this (if I had be able of correcting it I would have done it)

Thank you very much for your answer, I've just done as you wrote me and posted it in GitHub to make them know it, Big Grin




Theme © iAndrew 2016 - Forum software by © MyBB