def preprocess(self, image):
        """
        Provides a preprocessing facility (which may be overridden) whereby the supplied image is
        rotated according to the device's rotate capability. If this method is
        overridden, it is important to call the ``super`` method.

        :param image: An image to pre-process.
        :type image: PIL.Image.Image
        :returns: A new processed image.
        :rtype: PIL.Image.Image
        """
        if self.rotate == 0:
            return image

        angle = self.rotate * -90
        return image.rotate(angle, expand=True).crop((0, 0, self._w, self._h))
Provides a preprocessing facility (which may be overridden) whereby the supplied image is
        rotated according to the device's rotate capability. If this method is
        overridden, it is important to call the ``super`` method.

        :param image: An image to pre-process.
        :type image: PIL.Image.Image
        :returns: A new processed image.
        :rtype: PIL.Image.Image