1 Sep 2006 01:40
Re: How to get DIB into Tkinter frame?
Metz, Bobby W, WWCS <bwmetz <at> att.com>
2006-08-31 23:40:00 GMT
2006-08-31 23:40:00 GMT
>From your code snippet I fail to see where you're defining "im". I'm
assuming the value of im is the same as your VB value "Picture1.hDC".
Is that a constant from the PinPoint.Plate object? If so, perhaps it's
not defined. From first glance the error looks valid.
Bobby
-----Original Message-----
From: tkinter-discuss-bounces <at> python.org
[mailto:tkinter-discuss-bounces <at> python.org]On Behalf Of Reiner M. Stoss
Sent: Thursday, August 31, 2006 2:03 PM
To: tkinter-discuss <at> python.org
Subject: [Tkinter-discuss] How to get DIB into Tkinter frame?
Folks, I have a problem.
I have a scriptable software that works with
images in FITS format (astronomical images).
It can generate Windows device-independent bitmaps (DIB)
and paint them as picture into any device context including
Picture controls in Visual Basic, etc.
Here is VB sample code that works for me:
---
Private Sub Command1_Click()
Set p = CreateObject("PinPoint.Plate")
p.AttachFITS
"M:\Images\LaSagra\20060828\012128+170000-sagra21-S001-R001.fts"
(Continue reading)
Yes, I have not defined "im". That's excatly the point.
I do not know how do define it.
Picture1 is a PictureBox in VB and the PaintPicture
method of PinPoint then sends the picture into this
PictureBox.
But I need to do it in Python/Tkinter so how to tell
the PaintPicture to send the picture into a Tkinter frame?
Again the code in VB:
---
Private Sub Command1_Click()
Set p = CreateObject("PinPoint.Plate")
p.AttachFITS "M:\Images\LaSagra\20060828\012128+170000-sagra21-S001-R001.fts"
Set m = p.NewPlateDIB()
m.Create 1, 1, 1, 1
m.Render 60000, 0
m.PaintPicture Picture1.hDC
p.DetachFITS
End Sub
---
And the not working code in Python:
RSS Feed