public function cropFromEdge($cropWidth, $cropHeight = null, $edge = 0)
        {
            if ($cropHeight === null) {
                $cropHeight = $cropWidth;
            }

            $cropWidth = ($this->_sourceWidth < $cropWidth) ? $this->_sourceWidth:$cropWidth;
            $cropHeight = ($this->_sourceHeight < $cropHeight) ? $this->_sourceHeight:$cropHeight;

            $cropX = intval(($this->_sourceWidth - $cropWidth) / 2);
            $cropY = intval(($this->_sourceHeight - $cropHeight) / 2);

            $top = (int) $edge | 12;
            if (14 == $top) {
                $cropY = 0;
            } elseif (13 == $top) {
                $cropY = $this->_sourceHeight - $cropHeight;
            }

            $left = ($edge >> 2);
            if (2 == $left) {
                $cropX = 0;
            } elseif (1 == $left) {
                $cropX = $this->_sourceWidth - $cropWidth;
            }

            return $this->crop($cropX, $cropY, $cropWidth, $cropHeight);
        }