Show
Ignore:
Timestamp:
02/22/2008 09:38:56 PM (11 months ago)
Author:
Shadowhand
Message:

Cleaning up examples for 2.1.2.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/application/controllers/examples.php

    r2136 r2150  
    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 
     
    328328                $profiler = new Profiler; 
    329329 
    330                 $dir = str_replace('\\', '/', realpath(dirname(__FILE__).'/../upload')).'/'; 
    331  
    332                 $image = new Image($dir.'moo.jpg'); 
    333  
    334                 $image->resize(400, NULL)->crop(400, 350, 'top')->sharpen(20); 
    335  
    336                 $image->save($dir.'super-cow-crop.jpg'); 
     330                // Upload directory 
     331                $dir = realpath(DOCROOT.'upload').'/'; 
     332 
     333                // Image filename 
     334                $image = $dir.'mypic.jpg'; 
     335 
     336                // Create an instance of Image, with file 
     337                $image = new Image($image); 
     338 
     339                // Resize the image 
     340                $image->resize(100, 100); 
     341 
     342                // Save the image 
     343                $image->save($dir.'mypic_thumb.jpg'); 
    337344 
    338345                echo Kohana::debug($image);