Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from os import system
- from PIL import Image
- from PIL import ImageDraw
- def clear_screen():
- system("cls")
- clear_screen()
- print("\nDas Programm befindet sich noch in der Testphase!!")
- print("\n\n(Anstatt Komma bitte einen Punkt eingeben!!!)")
- SchaftDurchmesser = float(input("\n\nSchaftDurchmesser > "))
- TD = float(input("TD > "))
- step_mm = round((SchaftDurchmesser - TD) / 2, 3)
- step_inch = round(step_mm / 0.0254, 1)
- print ("Step in mm ist gleich " + str(step_mm))
- print (step_inch)
- text_step_mm = "Step in mm = " + str(step_mm)
- text_step_inch = "Step für Blade = " + str(step_inch)
- size = width, height = 600,400
- img = Image.new( "RGB", size , "white")
- img = Image.open("testpic.png")
- draw = ImageDraw.Draw(img)
- BLACK = 0,0,0
- draw.text((10,20), text_step_mm, BLACK)
- draw.text((10,40), text_step_inch, BLACK)
- img.save("testpic.png")
- img.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement