_image is protected
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 9 May 2010 20:08:23 +0000 (16:08 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 9 May 2010 20:17:53 +0000 (16:17 -0400)
ansel/lib/Faces/Base.php

index 4c06a4c..a1201d5 100644 (file)
@@ -587,12 +587,12 @@ class Ansel_Faces_Base
     /**
      * Create a face image from the given data.
      *
-     * @param integer $face_id   Face id to generate
-     * @param integer $image     Image face belongs to
-     * @param integer $x1        The top left corner of the cropped image.
-     * @param integer $y1        The top right corner of the cropped image.
-     * @param integer $x2        The bottom left corner of the cropped image.
-     * @param integer $y2        The bottom right corner of the cropped image.
+     * @param integer $face_id    Face id to generate
+     * @param Ansel_Image $image  Image face belongs to
+     * @param integer $x1         The top left corner of the cropped image.
+     * @param integer $y1         The top right corner of the cropped image.
+     * @param integer $x2         The bottom left corner of the cropped image.
+     * @param integer $y2         The bottom right corner of the cropped image.
      *
      * @return integer the face id
      */
@@ -603,17 +603,17 @@ class Ansel_Faces_Base
 
         // Crop to the face
         try {
-            $result = $image->_image->crop($x1, $y1, $x2, $y2);
+            $result = $image->getHordeImage()->crop($x1, $y1, $x2, $y2);
         } catch (Horde_Image_Exception $e) {
             throw new Horde_Exception($e->getMessage());
         }
         // Resize and save
         $ext = Ansel_Faces::getExtension();
         $path = Ansel_Faces::getVFSPath($image->id);
-        $image->_image->resize(50, 50, false);
+        $image->getHordeImage()->resize(50, 50, false);
         try {
             $GLOBALS['ansel_vfs']->writeData($path . 'faces', $face_id . $ext,
-                                             $image->_image->raw(), true);
+                                             $image->getHordeImage()->raw(), true);
         } catch (VFS_Exception $e) {
             throw new Horde_Exception_Prior($e);
         }