[Bf-python] Blender.Image Function
Campbell Barton
cbarton at metavr.com
Mon Feb 21 13:41:31 CET 2005
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
More information about the Bf-python
mailing list