This class should be ‘mixed-in’ to any
luma.core.device.devicedisplay implementation that should have “device-like” capabilities.
capabilities(width, height, rotate, mode='1')¶
Assigns attributes such as
bounding_boxcorrectly oriented from the supplied parameters.
- width (int) – The device width.
- height (int) – The device height.
- rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 represents 270° rotation.
- mode (str) – The supported color model, one of
Initializes the device memory with an empty (blank) image.
Should be overridden in sub-classed implementations.
Parameters: image (PIL.Image.Image) – An image to display. Raises: NotImplementedError –
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
Parameters: image (PIL.Image.Image) – An image to pre-process. Returns: A new processed image. Return type: PIL.Image.Image