ImageTk.PhotoImage Bus Error on Snow Leopard

Richard Jones <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
I'm getting a Bus Error attempting to use ImageTk.PhotoImage on Snow  
Leopard. I've compiled PIL myself. I'm using the system Tcl/Tk (8.4).  
The selftest.py runs fine.

The code I'm attempting is:

import Tkinter as tk
root = tk.Tk()
image = Image.open('Images/lena.jpg')
photo = ImageTk.PhotoImage(image)

and I get the Bus Error on the last line. gdb (which I'm quite rusty  
at driving) says:

 >>> photo = ImageTk.PhotoImage(image)
Reading symbols for shared libraries ... done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000028
0x16e72a28 in Tk_GetImageMasterData ()
(gdb)

I've manually traced and I know the code is breaking somewhere in  
PyImagingPhotoPut.

I've confirmed the image data loads OK (Image.load) by using the same  
image code in a pyglet program and displaying it.

Any suggestions?


       Richard

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.