[Bf-python] Blender.Image Function
Austin Benesh
doccoaster at msn.com
Mon Feb 21 02:59:51 CET 2005
Ok, you may want to check out my recent message containing my prototype
function - please realize it is ONLY PROTOTYPE! I will combine the 4 (RGBA)
into one list return.
-----Original Message-----
From: bf-python-bounces at projects.blender.org
[mailto:bf-python-bounces at projects.blender.org] On Behalf Of Campbell Barton
Sent: Monday, February 21, 2005 5:42 AM
To: Blender Foundation Python list
Subject: Re: [Bf-python] Blender.Image Function
Agree'd, if your getting 1 pixel then the rgb of that is available
anyway, no point in having 3 python calls for 1 pixel,
probably shoud have sypport for alpha too.
- Cam
Stephen Swaney wrote:
>On Sun, Feb 20, 2005 at 05:01:21PM -0700, Austin Benesh wrote:
>
>
>>I am writing a patch that many people say is needed it adds three new
>>functions to Blender.Image:
>>
>>getPixelColor_G(x, y)
>>
>>getPixelColor_R(x, y)
>>
>>getPixelColor_B(x, y)
>>
>>
>
>In my not-so-humble opinion, a nicer and slightly more OO
>interface would be to provide a single method that returns
>a list of the values:
>
>r,g,b = getPixelColor( x, y )
>
>This would be nicer for treating the pixel as a vector in color
>space. And much less typing and overhead than:
>
>r = getP_R..
>g = getP_G..
>b = getP_B..
>
>If you don't want the extra values, you can always toss
>them:
>
>junk, g, junk = getPixelColor()
>
>But opinions may vary. Let the debate begin!
>
>
>
--
Campbell J Barton
133 Hope Street
Geelong West, Victoria 3218 Australia
URL: http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241
_______________________________________________
Bf-python mailing list
Bf-python at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-python
More information about the Bf-python
mailing list