![]() |
Image manipulation not working on localhost - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Image manipulation not working on localhost (/showthread.php?tid=14387) Pages:
1
2
|
Image manipulation not working on localhost - El Forum - 01-29-2009 [eluser]dsheetz[/eluser] That didn't help. I don't get any errors, or any output, with dynamic output on/off and any of the image libraries. Does this code need to go in the controller or something? Right now I have it in my view file. Image manipulation not working on localhost - El Forum - 01-29-2009 [eluser]dsheetz[/eluser] This is curious... the following code: --- Code: $filename = "photo1.jpg"; Generates the following output: Code: Array Notice how the image library is different for the $config array vs. the image_lib object... could this be indicative of a configuration error? Image manipulation not working on localhost - El Forum - 01-29-2009 [eluser]dsheetz[/eluser] by the way, there should be opening PRE tags in each of the initial echo statements... the forum seems to have escaped those somehow. Edit: fixed the above post to quote code properly. Image manipulation not working on localhost - El Forum - 01-30-2009 [eluser]IkoTikashi[/eluser] [quote author="dsheetz" date="1233287929"]That didn't help. I don't get any errors, or any output, with dynamic output on/off and any of the image libraries. Does this code need to go in the controller or something? Right now I have it in my view file.[/quote] Jupp, the code should go into the controller, I have it in the welcome.php controller in the "function index()". Image manipulation not working on localhost - El Forum - 01-30-2009 [eluser]IkoTikashi[/eluser] [quote author="dsheetz" date="1233288714"]Notice how the image library is different for the $config array vs. the image_lib object... could this be indicative of a configuration error?[/quote]Hm strange, do you "autoload" the image_lib in config/autoload.php? Do you load it somewhere else? Here's my main controller: Code: <?php Image manipulation not working on localhost - El Forum - 03-28-2009 [eluser]neosable[/eluser] I had the same problem I removed the image_lib from autoload and now works - this must be a bug Image manipulation not working on localhost - El Forum - 12-02-2009 [eluser]hamzakhan[/eluser] <?php /** * * */ class Image extends Controller { function Image() { parent::Controller(); } function index() { $this->load->library('image_lib'); $config['image_library'] = 'gd2'; $config['source_image'] = '/server/sscart/assets/images/catagory/mypic.jpg'; $config['create_thumb'] = TRUE; $config['maintain_ratio'] = TRUE; $config['width'] = 25; $config['height'] = 25; $config['dynamic_output'] = TRUE; // print "<img src='/server/sscart/assets/images/catagory/mypic.jpg'>"; if ( ! $this->image_lib->resize()) { echo $this->image_lib->display_errors(); } print "<pre>"; print_r($config); print_r($this->image_lib); } } ?> botheration is the first rule of codeigneter you cannot get your solution untill unless u bother so please tell me i am bother for long time.fed up from this rubish topic. not able to resize a simple image. code is above my root dir of codeigneter is /server/sscart/ assest folder is /server/sscart/assets/images/catagory/mypic.jpg library is loaded evey thing is working fine then what is goin wrong. Image manipulation not working on localhost - El Forum - 12-03-2009 [eluser]IkoTikashi[/eluser] @hamzakhan: It could that you need to load the lib after defining the configs, not before: $this->load->library('image_lib', $config); Image manipulation not working on localhost - El Forum - 12-03-2009 [eluser]hamzakhan[/eluser] IkoTikashi thanks for the answer my problem is now solved last night. but still thanks for your time. |