public function getFaceImageObject($face_id)
{
$face = $this->getFaceById($face_id, true);
// Load the image for this face
if (!$this->viewExists($face['image_id'], $face_id, true)) {
throw new Ansel_Exception(sprintf("Unable to create or locate face_id %u", $face_id));
}
$vfspath = Ansel_Faces::getVFSPath($face['image_id']) . 'faces';
$vfsname = $face_id . Ansel_Faces::getExtension();
$img = Ansel::getImageObject();
try {
$data = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Vfs')->create('images')->read($vfspath, $vfsname);
} catch (Horde_Vfs_Exception $e) {
throw new Ansel_Exception($e);
}
$img->loadString($data);
return $img;
}