1. You probably have to install tk/tcl development package (I was a redhat user few years ago, so that is what I can recall) 2. Blurring is carried via a convolution, so probably a faster and more flexible method is to use ndimage (numpy.numarray.nd_image), or scipy.
Nadav -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris S Sent: Monday, November 06, 2006 20:39 To: [email protected] Subject: [Image-SIG] Array to Image to Array I'm trying to "smooth" a 2D array of floats by converting it to a PIL image, blurring it, then converting it back to an array. However, I can find no practical way to convert arrays to and from PIL. I've found http://effbot.org/zone/pil-numpy.htm but it was written 8 years ago for Numeric and doesn't appear to work with the current version of Numpy and PIL. Does anyone know how to adapt this code to work correctly with the current libraries? I also noticed that PIL 1.1.6b2 has a new fromarray method, but all my attempts to compile it on FC5 fail with: _imagingtk.c:20:16: error: tk.h: No such file or directory _imagingtk.c:23: error: expected ')' before '*' token _imagingtk.c:31: error: expected specifier-qualifier-list before 'Tcl_Interp' _imagingtk.c: In function '_tkinit': _imagingtk.c:37: error: 'Tcl_Interp' undeclared (first use in this function) _imagingtk.c:37: error: (Each undeclared identifier is reported only once _imagingtk.c:37: error: for each function it appears in.) _imagingtk.c:37: error: 'interp' undeclared (first use in this function) _imagingtk.c:45: error: expected expression before ')' token _imagingtk.c:51: error: 'TkappObject' has no member named 'interp' _imagingtk.c:55: warning: implicit declaration of function 'TkImaging_Init' error: command 'gcc' failed with exit status 1 Any help resolving this issue is appreciated. Thanks, Chris P.S. Sorry if this is double posted. I tried sending from Gmane but when the post didn't appear after several hours I subscribed directly to the list instead. _______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig _______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig
