Changeset 2151

Show
Ignore:
Timestamp:
02/22/2008 09:39:31 PM (9 months ago)
Author:
Shadowhand
Message:

Merged r2150 into releases/2.1.2

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • releases/2.1.2/application/controllers/examples.php

    r2128 r2151  
    4949                        $archive = new Archive('zip'); 
    5050 
    51                         // Add welcome.php with the name of test.php 
    52                         $archive->add(APPPATH.'views/', 'shitty/views', TRUE); 
     51                        // Download the application/views directory 
     52                        $archive->add(APPPATH.'views/', 'app_views/', TRUE); 
    5353 
    5454                        // Download the built archive 
     
    336336                $profiler = new Profiler; 
    337337 
    338                 $dir = str_replace('\\', '/', realpath(dirname(__FILE__).'/../upload')).'/'; 
    339  
    340                 $image = new Image($dir.'moo.jpg'); 
    341  
    342                 $image->resize(400, NULL)->crop(400, 350, 'top')->sharpen(20); 
    343  
    344                 $image->save($dir.'super-cow-crop.jpg'); 
     338                // Upload directory 
     339                $dir = realpath(DOCROOT.'upload').'/'; 
     340 
     341                // Image filename 
     342                $image = $dir.'mypic.jpg'; 
     343 
     344                // Create an instance of Image, with file 
     345                $image = new Image($image); 
     346 
     347                // Resize the image 
     348                $image->resize(100, 100); 
     349 
     350                // Save the image 
     351                $image->save($dir.'mypic_thumb.jpg'); 
    345352 
    346353                echo Kohana::debug($image);