![]() |
Problem resizing one original image two times - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problem resizing one original image two times (/showthread.php?tid=8060) Pages:
1
2
|
Problem resizing one original image two times - El Forum - 05-04-2008 [eluser]Unknown[/eluser] Hi I've the following problem I upload one image in the directory ./images/originals Then I want to resize this image to a compacter format. Therfore i resize it and create with the $config['new_image'] attribute a compact version in ./images/compact After this i resize the original image to create a thumbnail version. Therfore i resize it with the $config['new_image'] attribute to create the thumbnail in ./images/thumbnails The problem is that after the upload the thumbnail is created but the compact version is not. I don't know why. Maybe you can help me? Here is the code Code: function save() { Problem resizing one original image two times - El Forum - 05-04-2008 [eluser]wiredesignz[/eluser] The image library needs to be clear()'d and re initialize()'d for each call, the second call to load the library is ignored by CI (the class is already loaded) so the constructor is not run with the second config settings. Problem resizing one original image two times - El Forum - 05-04-2008 [eluser]Unknown[/eluser] thank you now it worked the way i want to! Problem resizing one original image two times - El Forum - 05-04-2008 [eluser]gunter[/eluser] every 3 days someone with this problem... It would be time to change the first example in the userguide... Problem resizing one original image two times - El Forum - 05-04-2008 [eluser]jaume[/eluser] that's right gunter, maybe this would be the solution! ![]() Problem resizing one original image two times - El Forum - 05-12-2008 [eluser]Sumon[/eluser] Frinds, Her is my code: Code: $config['image_library'] = 'GD2'; First resize is working but not second one. I feel this line is incorrect $this->image_lib->clear(); please let me know correct one. Problem resizing one original image two times - El Forum - 05-12-2008 [eluser]wiredesignz[/eluser] The image library needs to be re initialize()’d for each call, the second call to load the library is ignored because the class is already loaded. Problem resizing one original image two times - El Forum - 05-12-2008 [eluser]Sumon[/eluser] who shall i do that? please let me know ... Problem resizing one original image two times - El Forum - 05-12-2008 [eluser]wiredesignz[/eluser] The user guide is very vague about re-using the image library, but if you read carefully you see this. Code: $this->image_lib->initialize($config); Problem resizing one original image two times - El Forum - 05-12-2008 [eluser]Sumon[/eluser] Thanks a lot..... ![]() |