What I'm doing is very simple. I've written a wrapper for the gd library, which allows me direct and *unsafe* access to the image data. All I have right now is functions to fetch a matrix from the red, green, and blue channels to a matrix, and dump data from matrices into said channels. Eventually, this will be a more-or-less feature-complete gd wrapper, so you'll be able to draw lines, arcs, text, etc.
For the application of image<-->matrix, this is a *vast* improvement over gdmodule (the Python API wrap of gd), since the best it offers is python functions to set and read pixels one at a time. In my version, I never do anything with python in my inner loops. This makes things super speedy (say, a few hundred times faster). That said, my default "error handling" is nonexistent, which is to say, I segfault like it's going out of style. I haven't had time to work on this because I'm busy with other projects (F4 and my senior thesis). You'll probably see something by the end of dev1, since Marshall Hampton has agreed to help me get this up & running. --tom On Fri, 23 May 2008, David Joyner wrote: > Hi Tom: > > I heard you are working on image processing stuff and was wondering if > it would be > possible to get a rough idea of what you are doing. I just want to be > able to try to > follow along, if possible. I doubt I can help beyond testing and > encouragement though. > I'm having a lot of fun reading Alasdair McAndrew's Into to Digital Processing > (FYI, which I think is <$10 used on amazon.com!). > > - David > > On Fri, May 23, 2008 at 2:25 PM, Marshall Hampton <[EMAIL PROTECTED]> wrote: >> >> Tom Boothby, who I think does not read this list, is also working on >> improving image manipulation in sage without using the PIL. He is >> only using the gd library. Its a work in progress right now though. >> >> -M. Hampton >> >> On May 23, 9:26 am, Simon King <[EMAIL PROTECTED]> wrote: >>> Dear Jason, dear David, >>> >>> On May 23, 3:57 pm, Jason Grout <[EMAIL PROTECTED]> wrote:> David Joyner >>> wrote: >>>> Since it's come up several times, it might be worth material for >>>> inclusion in the FAQ. >>>> > Since PIL has come up a few times on SAGE lists in vague ways, I >>>> > thought I'd try to >>>> > be more detailed. Here is a way using SAGE which might help. First, >>>> > it requires some preparation. >>> ... >>>> > You must install PIL fromhttp://www.pythonware.com/products/pil/. Here's >>>> > how: >>> >>> ... >>> >>> There is an experimental package PIL-1.1.5.spkg. This Tuesday i >>> succeeded to install it (on SUSE linux) simply with >>> sage -i PIL-1.1.5.spkg >>> after installing xv (and after installing mpi4py-0.3.1.spkg and >>> openmpi-1.1.4.spkg, i don't know if this is related). >>> >>> Perhaps this is easier than the way you described (however i don't >>> know whether "experimental" means that it wouldn't work on all >>> platforms) >>> >>> Yours >>> Simon >> >> >> > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---