Ticket #597: Image.diff

File Image.diff, 0.7 kB (added by tterragcnoom, 7 months ago)

system/libraries/Image.php

  • (a) Image.php vs. (b) (clipboard)

    a b  
    308308 
    309309                return $status; 
    310310        } 
     311         
     312        /** 
     313         * Output the image to the browser. 
     314         * 
     315         * @throws  Kohana_Exception 
     316         * @return  object 
     317         */ 
     318        public function output() 
     319        { 
     320                $new_image = $this->image['file']; 
     321 
     322                // Separate the directory and filename 
     323                $dir  = pathinfo($new_image, PATHINFO_DIRNAME); 
     324                $file = pathinfo($new_image, PATHINFO_BASENAME); 
     325 
     326                // Normalize the path 
     327                $dir = str_replace('\\', '/', realpath($dir)).'/'; 
     328 
     329                // Process the image with the driver 
     330                $status = $this->driver->process($this->image, $this->actions, $dir, $file, $output = TRUE); 
     331 
     332                // Reset the actions 
     333                $this->actions = array(); 
     334 
     335                return $status; 
     336        } 
    311337 
    312338        /** 
    313339         * Sanitize a given value type.