Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: in Python: Vector afbeelding weergeven.; lijnen en cirkels invoegen.  (gelezen 1761 keer)

Offline bart85

  • Lid
In een programma voor het biljarten wil ik het biljart tekenen met ballen en lijnen.
Hoe dit in een vector afbeelding zetten?
Je leert maar mooi over weg gaan met de commandline.
Linus: "I'm happy with the people who are wandering around looking at the stars but I am looking at the ground and I want to fix the pothole before I fall in."
I look to the clouds behind me and see the thunder coming.

Offline bart85

  • Lid
Re: in Python: Vector afbeelding weergeven.; lijnen en cirkels invoegen.
« Reactie #1 Gepost op: 2013/11/01, 15:03:05 »
Hoe kan ik in Python een afbeelding openen en laten zien?
Hoe teken ik punten, lijnen en cirkels aan de hand van coördinaten?
Je leert maar mooi over weg gaan met de commandline.
Linus: "I'm happy with the people who are wandering around looking at the stars but I am looking at the ground and I want to fix the pothole before I fall in."
I look to the clouds behind me and see the thunder coming.

Offline bart85

  • Lid
Re: in Python: Vector afbeelding weergeven.; lijnen en cirkels invoegen.
« Reactie #2 Gepost op: 2013/11/01, 17:08:20 »
#!/usr/bin/env python

import tkFileDialog
from Tkinter import *
from PIL import Image
import os

root= Tk()
filename = 'biljart.jpg'
img = Image.open(filename)

Hoe deze afbeelding laten zien in het venster root?
Je leert maar mooi over weg gaan met de commandline.
Linus: "I'm happy with the people who are wandering around looking at the stars but I am looking at the ground and I want to fix the pothole before I fall in."
I look to the clouds behind me and see the thunder coming.

Offline bart85

  • Lid
Re: in Python: Vector afbeelding weergeven.; lijnen en cirkels invoegen.
« Reactie #3 Gepost op: 2013/11/02, 19:20:37 »
    from PIL import Image, ImageTk
ImportError: cannot import name ImageTk
Je leert maar mooi over weg gaan met de commandline.
Linus: "I'm happy with the people who are wandering around looking at the stars but I am looking at the ground and I want to fix the pothole before I fall in."
I look to the clouds behind me and see the thunder coming.