Help with image_lib->resize() ? |
[eluser]chefnelone[/eluser]
Hello I have this function which upload a image and then if the image is bigger than 800X600 it is resized. It uploads the image but the resize isn't working. I can't see where is my mistake: It doesn't show any error Code: function upload_image(){ any help??
[eluser]pisio[/eluser]
if(! $this->image_lib->resize()){ $error2 = $this->image_lib->display_errors(); pritn_r($error2); }
[eluser]chefnelone[/eluser]
[quote author="pisio" date="1282012086"]if(! $this->image_lib->resize()){ $error2 = $this->image_lib->display_errors(); pritn_r($error2); }[/quote] Thanks got it working! edit: no at all....
[eluser]chefnelone[/eluser]
It works but only with some values. ...Just wondering if the Image Lib has a bug or the new patch for the Upload lib has affected it? First problem is that if the value of $config2['width'] is bigger than 630, let say 640, then it fails with any image I try to upload. Second problem is: if $config2['width'] = 630; it works fine with a image of 1024px X 777px (600Kb). But it fails again if I upload a image of 1200px X 900px(700Kb). With fails I mean it just stops in the line $this->image_lib->resize(), no $errors, nothing, the function just stops. In any case the image is uploaded correctly. The problem is just with resize(). I've been around this for hours... it's driving me crazy. I really appreciate any help My php.ini is set to allows to upload up to 32mb: upload_max_filesize = 32M Code: function upload_image(){
[eluser]Mat-Moo[/eluser]
As your using gd2 you could try my Image_moo library http://ellislab.com/forums/viewthread/161469/
[eluser]Petsoukos[/eluser]
I get the same error: Your server does not support the GD function required to process this type of image. But the resize function runs and saves the resized image in the destination directory. I don't know why it spits out the error... I'm autoloading the image_lib since I use it allot. This code runs after successful upload from the form Code: if(!$this->upload->do_upload()){ //.. Code: } else { I get the 2 files that I need and in their own directory... one in the source where the originals are kept and one on the thumbs folder. I can't figure out why it spits the error since the function runs and works correctly. |
Welcome Guest, Not a member yet? Register Sign In |