image resize - can't generate a thumb - 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: image resize - can't generate a thumb (/showthread.php?tid=41434) Pages:
1
2
|
image resize - can't generate a thumb - El Forum - 05-07-2011 [eluser]v1ctoria[/eluser] Hello Everybody ! After having 2hours on it, I need your help for an image resize which is actually not working and I don't know why... My controller Code: <?php My model Code: <?php And just in case, this is my view is you want to test quickly : Code: <div id="gallery"> The upload is totally fine, but the resize is not working and I tried so many things to get it done, but no one worked. Thank you all for your help image resize - can't generate a thumb - El Forum - 05-07-2011 [eluser]Zero-10[/eluser] Code: 'new_image' => $this->gallery_path . '/thumbs/newimage.png', I'm not a proficient programmer but I'd assume that'/thumbs/newimage.png', should be '/thumbs/', does that work for you? Oh and don't forget to chmod your gallery folders to 777 image resize - can't generate a thumb - El Forum - 05-07-2011 [eluser]v1ctoria[/eluser] Oh the line is not working without the image name, it was just a try that I forgot to erase. The thing is, I have this code from a tutorial actually based on an older version of codeigniter which is working absolutely fine. Can't understand why this is not working ... image resize - can't generate a thumb - El Forum - 05-08-2011 [eluser]d1a8lo24[/eluser] Make the following change on the configuration: Code: // CHange this Second is just a suggestion on what I think you are trying to do. If you are uploading images from this form to store and display then on the array for resizing and creating the new thumbnail image you should dynamically change the name otherwise you will replace the thumbnail every time but if that is the intention then there shouldn't be a problem. Aside from that also check your error logs to see if there are some errors. image resize - can't generate a thumb - El Forum - 05-08-2011 [eluser]d1a8lo24[/eluser] Also if your image folder is inside the applications folder make sure you change the following: Code: // From this image resize - can't generate a thumb - El Forum - 05-08-2011 [eluser]v1ctoria[/eluser] Concerning the ratio, no changes appeared. For the path, everything is fine because the upload is working and in my view I've got the correct full image displaying. I tried to echo every single image properties and all seems good for this resize, but it's still not working ... image resize - can't generate a thumb - El Forum - 05-08-2011 [eluser]d1a8lo24[/eluser] Ok I did a quick test on my setup and i'm using the latest CI 2.0.2 and I'm running a wamp server with php 5.3 So for the quick test using your code I created 1 controller that will do everything and i did change a few things but everything works. Code: class Testing extends CI_Controller { So you can do a quick try, make sure you create the folders first on the root if you use my paths otherwise you can change them. So I was able to upload and made a re size copy of the image a thumbs folder. image resize - can't generate a thumb - El Forum - 05-08-2011 [eluser]v1ctoria[/eluser] It still doesn't work for me, now i guess it's concerning the file and folder rights. DO you have enables some services in wamp ? nothing related with rights and permissions ? I'll try to upload it to a web server and see what it changes. image resize - can't generate a thumb - El Forum - 05-08-2011 [eluser]d1a8lo24[/eluser] Not realy except for curl, and 1 or 2 others that i don't think should matter. as far as permissions on this folders they are 0755 and i usually for manipulating the images i also give the same permissions. You might need to re install or update wamp to the latest. and yes try a quick test on your live server this will narrow down the problem where either CI or your server setup might be the proble. By the way, I'm running wamp 64bit on a windows 7 64bit machine. image resize - can't generate a thumb - El Forum - 05-08-2011 [eluser]v1ctoria[/eluser] I've tested the code in my server and seems to do not work. It is probably a problem with a parameter i have changed. I will test your code on a new installation tonight. |