ooxcb.contrib.pil¶
This module contains functions for putting and getting images as PIL Image instances.
-
ooxcb.contrib.pil.get_pil_image(drawable, x=0, y=0, width=None, height=None)¶ get an image of drawable as a PIL Image instance.
Parameters: - x: int
x offset
- y: int
y offset
- width: int or None
set to drawable’s width if None
- height: int or None
set to drawable’s height if None
-
ooxcb.contrib.pil.mixin()¶ add
put_pil_image()andget_pil_image()as methods toooxcb.xproto.Window.
-
ooxcb.contrib.pil.put_pil_image(gc, drawable, image, dst_x=0, dst_y=0)¶ display the PIL image instance image on the drawable drawable using the graphics context gc, at x = dst_x and y = dst_y. You have to take care that the depths of the drawable and the window match. No connection flushing is done.
Todo: use image’s depth