public function from($element = null)
    {
        if (!empty($element) && $element instanceof Image) {
            foreach (get_object_vars($element) as $key => $value) {
                $this->$key = $value;
            }

            return $this;
        }
    }
public function from($element = null)
    {
        if (!empty($element) && $element instanceof Image) {
            foreach (get_object_vars($element) as $key => $value) {
                $this->$key = $value;
            }

            return $this;
        }
    }
public function from ( $ element = null ) { if ( ! empty ( $ element ) && $ element instanceof Image ) { foreach ( get_object_vars ( $ element ) as $ key => $ value ) { $ this -> $ key = $ value ; } return $ this ; } }
Loads an image from Image or Figure class.

@access public
@param Image $element Image or Figure class.
@return \GImage\Image
Loads an image from Image or Figure class .