code/extensions/ExtendedImage.php
public function DetectedFace(){
			if($this->owner->exists()) {
				$cacheFile = $this->owner->cacheDetectedFaceFilename();

				if(!file_exists(Director::baseFolder()."/".$cacheFile) || isset($_GET['flush'])) {
					$this->owner->generateDetectedFaceImage();
				}
				
				if($this->owner instanceof SecureImage) $cached = new SecureImage_Cached($cacheFile);
				else $cached = new Image_Cached($cacheFile);

				// Pass through the title so the templates can use it
				$cached->Title = $this->owner->Title;
				$cached->ID = $this->owner->ID;
				$cached->ParentID = $this->owner->ParentID;
				return $cached;
			}
		}
public function DetectedFace(){
			if($this->owner->exists()) {
				$cacheFile = $this->owner->cacheDetectedFaceFilename();

				if(!file_exists(Director::baseFolder()."/".$cacheFile) || isset($_GET['flush'])) {
					$this->owner->generateDetectedFaceImage();
				}
				
				if($this->owner instanceof SecureImage) $cached = new SecureImage_Cached($cacheFile);
				else $cached = new Image_Cached($cacheFile);

				// Pass through the title so the templates can use it
				$cached->Title = $this->owner->Title;
				$cached->ID = $this->owner->ID;
				$cached->ParentID = $this->owner->ParentID;
				return $cached;
			}
		}
public function DetectedFace ( ) { if ( $ this -> owner -> exists ( ) ) { $ cacheFile = $ this -> owner -> cacheDetectedFaceFilename ( ) ; if ( ! file_exists ( Director :: baseFolder ( ) . "/" . $ cacheFile ) || isset ( $ _GET [ 'flush' ] ) ) { $ this -> owner -> generateDetectedFaceImage ( ) ; } if ( $ this -> owner instanceof SecureImage ) $ cached = new SecureImage_Cached ( $ cacheFile ) ; else $ cached = new Image_Cached ( $ cacheFile ) ; // Pass through the title so the templates can use it $ cached -> Title = $ this -> owner -> Title ; $ cached -> ID = $ this -> owner -> ID ; $ cached -> ParentID = $ this -> owner -> ParentID ; return $ cached ; } }
returns the image with the face marked in a red square

@return Image_Cached|SecureImage_Cached
returns the image with the face marked in a red square