This python package will allow you to draw small images on top of everything on your screen. You will be able to rotate and resize your image before drawing them. Desktop Pencil support many image file formats such as PNG, JPG, GIF and ICO. Desktop Pencil is best at drawing small images with few pixels.
If you have PIP installed you can simply run this command: pip install DesktopPencil
The package is uploaded to PyPi and can also be installed here.
This exampel will draw a frog on the screen for 5 seconds. The load
function returns a list with all the needed pixels including the position of them.
import DesktopPencil
frog = DesktopPencil.load("frog.png", 50, 1005)
DesktopPencil.draw(frog, 5000)
Rotation and size are optional arguments.
file
- The image you want to drawstart_pos_x
- Start position horizontalstart_pos_y
- Start position verticalrotation
- Image rotation eg. 90size
- Image size in tuple eg. (50,100)
Duration is an optional arguments.
pixels
- List returned from theload
functionduration
- How long the image is visible in milliseconds eg. 3500
import DesktopPencil
exampel_image = DesktopPencil.load("exampel.jpg", 0, 70, rotation=270, size=(70,100))
DesktopPencil.draw(exampel_image)