Set the raw pixel data of the image
| <multimedia:image>.setImageData( | |
| data | |
| size | |
| format = viz.TEX_RGB | |
| face = viz.POSITIVE_X |
)
data
String or buffer object containing raw pixel data.
size
A list specifying the dimensions of the texture.
viz.TEX_1D only requires a single dimension, [width].
viz.TEX_2D, viz.TEX_RECT, and viz.TEX_CUBE require 2 dimensions, [width,height].
viz.TEX_3D requires 3 dimensions, [width,height,depth].
format = viz.TEX_RGB
Texture format. Can be one of the following:
viz.TEX_RGB
viz.TEX_RGBA
viz.TEX_BGR
viz.TEX_BGRA
viz.TEX_LUMINANCE
viz.TEX_ALPHA
viz.TEX_LUMINANCE_ALPHA
face = viz.POSITIVE_X
This is an optional argument used only with Cube Mapped or 3D textures.
With Cube Mapped textures it specifies which face of the cube to apply the image to. This can be one of the following values:
viz.POSITIVE_X
viz.NEGATIVE_X
viz.POSITIVE_Y
viz.NEGATIVE_Y
viz.POSITIVE_Z
viz.NEGATIVE_Z
With 3D textures it specifies which depth slot to load the image into.
In both cases, the file must contain the same width, height, and pixel format as the original texture.
This command will modify the existing texture to contain the new image data. This will affect the appearance of all nodes that the texture was previously applied to.
True/False
<multimedia:image>.getImageData
<multimedia:image>.load
<multimedia:image>.loadBuffer