diff options
author | Stephen Swaney <sswaney@centurytel.net> | 2005-08-10 21:50:18 +0400 |
---|---|---|
committer | Stephen Swaney <sswaney@centurytel.net> | 2005-08-10 21:50:18 +0400 |
commit | eb64e304b4f7882e6922cbf1fe3e33e07664135a (patch) | |
tree | 93db246746af24bf995c62b2f6afd7267d489363 /source/blender/python/api2_2x/doc | |
parent | 1d08915f45883fe51c7f9113dca5fd9e4886dc89 (diff) |
Patch #2758 Update of image module.
New Image methods from Austin Benesh:
- getPixelI(x, y)
- getMinXY()
- setPixelF(x, y, [r, g, b, a])
- setPixelI(x, y, [r, g, b, a])
- save()
sorry for the delay.
Thanks.
Diffstat (limited to 'source/blender/python/api2_2x/doc')
-rw-r--r-- | source/blender/python/api2_2x/doc/Image.py | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/doc/Image.py b/source/blender/python/api2_2x/doc/Image.py index 1f604767aca..aad3d84781b 100644 --- a/source/blender/python/api2_2x/doc/Image.py +++ b/source/blender/python/api2_2x/doc/Image.py @@ -106,6 +106,18 @@ class Image: @param x: the x coordinate of pixel. @param y: the y coordinate of pixel. """ + def getPixelI(x, y): + """ + Get the the colors of the current pixel in the form [r,g,b,a]. + Returned values are ints normalized to 0 - 255. + Pixel coordinates are in the range from 0 to N-1. See L{getMaxXY} + @returns: [ r, g, b, a] + @rtype: list of 4 ints + @type x: int + @type y: int + @param x: the x coordinate of pixel. + @param y: the y coordinate of pixel. + """ def getMaxXY(): """ @@ -114,6 +126,13 @@ class Image: @rtype: list of 2 ints """ + def getMinXY(): + """ + Get the x & y origin for the image. Image coordinates range from 0 to size-1. + @returns: [x, y] + @rtype: list of 2 ints + """ + def getXRep(): """ Get the number of repetitions in the x (horizontal) axis for this Image. @@ -197,3 +216,40 @@ class Image: @type yrep: int @param yrep: The new value in [1, 16]. """ + + def setPixelF(x, y, (r, g, b,a )): + """ + Set the the colors of the current pixel in the form [r,g,b,a]. + Color values must be floats in the range 0.0 - 1.0. + Pixel coordinates are in the range from 0 to N-1. See L{getMaxXY} + @type x: int + @type y: int + @type r: float + @type g: float + @type b: float + @type a: float + @returns: nothing + @rtype: none + """ + + def setPixelI(x, y, (r, g, b, a)): + """ + Set the the colors of the current pixel in the form [r,g,b,a]. + Color values must be ints in the range 0 - 255. + Pixel coordinates are in the range from 0 to N-1. See L{getMaxXY} + @type x: int + @type y: int + @type r: int + @type g: int + @type b: int + @type a: int + @returns: nothing + @rtype: none + """ + + def save(): + """ + Saves the current image. + @returns: nothing + @rtype: none + """ |