Welcome Guest, Not a member yet? Register   Sign In
Image Lib - Resize failure
#4

[eluser]gRoberts[/eluser]
Sorry about that, the forums didn't notify me of any replies... i'm sure i asked it to.

It only seems to be a problem when I try resizing to 250x250.

Using both a 250x350 and 640x840 image they both remain the same size, although the code actually runs.

Code:
public function generate($source, $output, $width, $height) {
            
            $size = getimagesize($source);

            if($size[0] > $width || $size[1] > $height) {
                //echo "thumb";
                $config['image_library'] = 'GD2';
                //$config['library_path'] = '/usr/bin/X11';
                $config['source_image'] = $source;
                $config['maintain_ratio'] = TRUE;
                $config['create_thumb'] = false;
                $config['new_image'] = $output;
                $config['quality'] = 100;
                $config['width'] = (int)$width;
                $config['height'] = (int)$height;
                
                $this->base->image_lib->initialize($config);
                if(!$this->base->image_lib->resize())
                    die($this->base->image_lib->display_errors());
            } else
                copy($source, $output);
            
        }

Thanks


Messages In This Thread
Image Lib - Resize failure - by El Forum - 03-29-2008, 11:36 AM
Image Lib - Resize failure - by El Forum - 03-29-2008, 03:20 PM
Image Lib - Resize failure - by El Forum - 03-30-2008, 03:33 PM
Image Lib - Resize failure - by El Forum - 03-31-2008, 02:49 AM
Image Lib - Resize failure - by El Forum - 03-31-2008, 03:06 AM
Image Lib - Resize failure - by El Forum - 03-31-2008, 03:18 AM
Image Lib - Resize failure - by El Forum - 03-31-2008, 03:26 AM
Image Lib - Resize failure - by El Forum - 03-31-2008, 03:34 AM
Image Lib - Resize failure - by El Forum - 03-31-2008, 03:42 AM
Image Lib - Resize failure - by El Forum - 03-31-2008, 07:14 AM
Image Lib - Resize failure - by El Forum - 04-01-2008, 04:37 PM
Image Lib - Resize failure - by El Forum - 04-02-2008, 11:44 AM
Image Lib - Resize failure - by El Forum - 04-02-2008, 01:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB