[Bf-committers] RE: [Bf-python] New Python Function - Patch

Yann Vernier yann at donkey.dyndns.org
Wed Feb 23 11:07:48 CET 2005


On Tue, Feb 22, 2005 at 02:59:40PM +0100, Alexander Ewering wrote:
> On Mon, 21 Feb 2005, Austin Benesh wrote:
> >Ok, here is the patch for the documentation. The way this function works:
> >
> >getPixelColor(x,y)
> >
> >X,Y are (obviously) the coordinates of the pixel you want to know the color
> >of. It returns 4 floats in the range of 0-1 (not 0-255) in the form of
> >[r,g,b,a]. I am going to start working on a setPixelColor(x,y) as well.
> 
> Just a random comment: I would think that such a method to access single
> pixel values with one function call per pixel is pretty useless unless you
> have a supercomputer.
> 
> What would probably be much more useful is a function returning a whole
> array (or whatever it's called in python) instead of a single pixel.

I'd go for a Python buffer protocol access, which would permit loading
the image into PIL (the python imaging library).

-- 
PGP fingerprint = 9242 DC15 2502 FEAB E15F  84C6 D538 EC09 5380 5746
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://projects.blender.org/pipermail/bf-committers/attachments/20050223/43946757/attachment.pgp


More information about the Bf-committers mailing list