public function getConstraints($options)
    {
        $constraints = array();

        if ($options['validate']) {
            $constraints[] = new Image(array(
                'mimeTypes' => array(
                    'image/gif',
                    'image/png',
                    'image/jpg',
                    'image/jpeg'
                ),
                'minWidth'  => $this->calcMin('width', $options),
                'minHeight' => $this->calcMin('height', $options)
            ));
        }

        return $constraints;
    }