public function setImageMax($maxwidth, $maxheight)
    {
        if ($maxwidth === null) {
            $tempwidth = null;
        } else if (($this->_minwidth !== null) and ($maxwidth < $this->_minwidth)) {
            include_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception(
                "The maximum image width must be greater than or equal to the "
                . "minimum image width, but {$maxwidth} < {$this->_minwidth}"
            );
        } else {
            $tempwidth = (integer) $maxwidth;
        }

        if ($maxheight === null) {
            $tempheight = null;
        } else if (($this->_minheight !== null) and ($maxheight < $this->_minheight)) {
            include_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception(
                "The maximum image height must be greater than or equal to the "
                . "minimum image height, but {$maxheight} < {$this->_minwidth}"
            );
        } else {
            $tempheight = (integer) $maxheight;
        }

        $this->_maxwidth  = $tempwidth;
        $this->_maxheight = $tempheight;
        return $this;
    }