[SciPy-User] ROI, the sequel
Tue Aug 3 21:48:33 CDT 2010
Hmm, I didn't realize PIL has a rasterizer. That's useful...
(PIL and I parted ways a while ago, but I should dig back into the
code to see if I can pull out the rasterizer and use it standalone.)
Emil: PIL ought to be an easy way to get what you need, it seems.
On Aug 3, 2010, at 10:26 PM, Christopher Barker wrote:
> Zachary Pincus wrote:
>> The task you want to accomplish is called "polygon rasterization",
>> I have long looked for a simple python (or better, portable C that I
>> could use from anywhere) module that does this well. (Ideally with
>> optional antialiasing.) I really haven't found much... any graphics
>> toolkit (e.g. for throwing up a GUI) can be convinced to rasterize to
>> a memory buffer, which can be converted to a numpy array, but it's
>> simple or particularly portable.
> I've used PIL for that -- much less overhead than a GUI toolkit, if
> don't need a GUI.
> Christopher Barker, Ph.D.
> Emergency Response Division
> NOAA/NOS/OR&R (206) 526-6959 voice
> 7600 Sand Point Way NE (206) 526-6329 fax
> Seattle, WA 98115 (206) 526-6317 main reception
> SciPy-User mailing list
More information about the SciPy-User