DIB in Tkinter frame
Verfasst: Mittwoch 30. August 2006, 21:04
Hallo Leute,
habe eine engine die ich aus Python mittels pywin32 scripte. Diese engine kann DIBs erzeugen. Wie kann man diese aber nun in Tkinter anzeigen?
Die Methode in der engine lautet:
---
Syntax
PlateDIB.PaintPicture(DeviceContext)
The method syntax has these parts:
Part Description
DeviceContext (Long) Handle to a GDI device context containing the destination bitmap (HDC, Long)
Return (Nothing) Does not return a value.
Remarks
Paints the bitmap in the PlateDIB object onto a bitmap in some other Windows Graphics Device Interface device. From Visual Basic, you can paint into a Picture control. For example, suppose you have a form with a Picture control on it named picImage, and a PlateDIB object that has been Create()ed and Render()ed named pdM104:
pdM104.PaintPicture picImage.handle
---
In Tkinter kenn ich sowas wie dies::
Wie nun diese zwei Dinge verbinden? Wie krieg ich das DIB in photo1
bzw in mein frame?
D.h. was muss ich als Argument fuer die PaintPicture Methode uebergeben, damit das bitmap in Tkinter in dem frame auftaucht?
Vielleicht etwas bloed erklaert... ich hoffe ihr wisst was ich meine
Danke,
Reiner
habe eine engine die ich aus Python mittels pywin32 scripte. Diese engine kann DIBs erzeugen. Wie kann man diese aber nun in Tkinter anzeigen?
Die Methode in der engine lautet:
---
Syntax
PlateDIB.PaintPicture(DeviceContext)
The method syntax has these parts:
Part Description
DeviceContext (Long) Handle to a GDI device context containing the destination bitmap (HDC, Long)
Return (Nothing) Does not return a value.
Remarks
Paints the bitmap in the PlateDIB object onto a bitmap in some other Windows Graphics Device Interface device. From Visual Basic, you can paint into a Picture control. For example, suppose you have a form with a Picture control on it named picImage, and a PlateDIB object that has been Create()ed and Render()ed named pdM104:
pdM104.PaintPicture picImage.handle
---
In Tkinter kenn ich sowas wie dies::
Code: Alles auswählen
left_frame.create_image(0, 0, anchor=NW, image=photo1)
bzw in mein frame?
D.h. was muss ich als Argument fuer die PaintPicture Methode uebergeben, damit das bitmap in Tkinter in dem frame auftaucht?
Vielleicht etwas bloed erklaert... ich hoffe ihr wisst was ich meine

Danke,
Reiner