Re: [Image-SIG] Two PIL based Hill Shading Implementations, using Python Python/C.

2007-02-08 Thread John Barratt
= arctan2(dx, dy) c = sin(alt)*sin(slope) + cos(alt)*cos(slope)*cos(-az - aspect - 0.5*pi) c = N.where(c 0.0, c*255.0, 0.0) imgS = Image.fromarray(c.astype('uint8')) imgS.save(filenameOut,'PNG') -- John Barratt - www.langarson.com.au Python, Zope, GIS, Weather

Re: [Image-SIG] Comparison of PIL and GD speed for setting pixels through python

2007-02-05 Thread John Barratt
than the gd/raw/c version I would be interested to know, as the core looping code is basically identical... Cheers, JB. -- John Barratt - www.langarson.com.au Python, Zope, GIS, Weather ___ Image-SIG maillist - Image-SIG@python.org http

Re: [Image-SIG] Comparison of PIL and GD speed for setting pixels through python

2007-02-05 Thread John Barratt
with the next example. Thanks for the comments, JB. -- John Barratt - www.langarson.com.au Python, Zope, GIS, Weather ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig

Re: [Image-SIG] Comparison of PIL and GD speed for setting pixels through python

2007-02-05 Thread John Barratt
methods such as drawing text, lines, etc. I suppose PyGame will have a lot of this, but perhaps not the breadth of more traditional image operations that PIL, or even gd provide. Thanks for you comments, Cheers, JB. -- John Barratt - www.langarson.com.au Python, Zope, GIS, Weather

[Image-SIG] Two PIL based Hill Shading Implementations, using Python Python/C.

2007-02-05 Thread John Barratt
be. Comments welcome. :) Cheers, JB. -- John Barratt - www.langarson.com.au Python, Zope, GIS, Weather ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig

Re: [Image-SIG] Comparison of PIL and GD speed for setting pixels through python

2007-02-04 Thread John Barratt
Christopher Barker wrote: John Barratt wrote: I've had a need to do some optimisation of some low level pixel setting code, and have as such done some tests of different ways of doing this using PIL and alternatively with gd via ctypes. Have you tried using PIL + numpy -- you can

Re: [Image-SIG] Comparison of PIL and GD speed for setting pixels through python

2007-02-04 Thread John Barratt
that affected the image created, but not the timing, and added code to save the files out where possible to further check they were actually doing what was intended. Cheers, JB. -- John Barratt - www.langarson.com.au Python, Zope, GIS, Weather

Re: [Image-SIG] Comparison of PIL and GD speed for setting pixels through python

2007-02-04 Thread John Barratt
, and might help show this more clearly. Cheers, JB. -- John Barratt - www.langarson.com.au Python, Zope, GIS, Weather ___ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig