Codeigniter的resize库保持输出1

i was just getting to know codeigniter, in doing so i came across the image manipulation class, i tried the resize functionality but it didn't work.Technically it is working and there is no error but it is just displaying 1. I mean shouldn't it display the thumbnail sized image instead of 1? or im missing something here?Here is the code.

controller.php

public function image()
    {
        $config['image_library']='gd2';
        $config['source_image']='./uploads/pic.jpeg';
        $config['create_thumb']=true;
        $config['width']=50;
        $config['height']=70;
        $config['maintain_ratio']= true;

        $this->load->library('image_lib',$config);
        if($img= $this->image_lib->resize())
        {
            echo 'the image is: '.$img;
        }
        else
        {
            echo $this->image_lib->display_errors();
        }
    }

i got the answer, i now think it was a rookie question, anyways it might help someone someday, so i just added $config['dynamic_output']=true and it shows the image now.