Module Image :: Class Image
[frames | no frames]

Class Image


The Image object

This object gives access to Images in Blender.
Method Summary
int getBindCode()
Get the Image's bindcode.
int getDepth()
Get the pixel depth of this image.
string getFilename()
Get the filename of the image file loaded into this Image object.
string getName()
Get the name of this Image object.
list of 2 ints getSize()
Get the [width, height] dimensions (in pixels) of this image.
int getXRep()
Get the number of repetitions in the x (horizontal) axis for this Image.
int getYRep()
Get the number of repetitions in the y (vertical) axis for this Image.
  reload()
Reloads this image from the filesystem.
  setName(name)
Set the name of this Image object.
  setXRep(xrep)
Texture tiling: set the number of x repetitions for this Image.
  setYRep(yrep)
Texture tiling: set the number of y repetitions for this Image.

Class Variable Summary
  bindcode: Texture's bind code (readonly).
  depth: The pixel depth of the image.
  filename: The filename (path) to the image file loaded into this Image object.
  name: The name of this Image object.
  size: The [width, height] dimensions of the image (in pixels).
  xrep: Texture tiling: the number of repetitions in the x (horizontal) axis.
  yrep: Texture tiling: the number of repetitions in the y (vertical) axis.

Method Details

getBindCode()

Get the Image's bindcode. This is for texture loading using BGL calls, see for example BGL.glBindTexture.
Returns:
int

getDepth()

Get the pixel depth of this image.
Returns:
int

getFilename()

Get the filename of the image file loaded into this Image object.
Returns:
string

getName()

Get the name of this Image object.
Returns:
string

getSize()

Get the [width, height] dimensions (in pixels) of this image.
Returns:
list of 2 ints

getXRep()

Get the number of repetitions in the x (horizontal) axis for this Image. This is for texture tiling.
Returns:
int

getYRep()

Get the number of repetitions in the y (vertical) axis for this Image. This is for texture tiling.
Returns:
int

reload()

Reloads this image from the filesystem. If used within a loop you need to redraw the Window to see the change in the image, e.g. with Window.RedrawAll().
Returns:
None

Warning: if the image file is corrupt or still being written, it will be replaced by a blank image in Blender, but no error will be returned.

setName(name)

Set the name of this Image object.
Parameters:
name - The new name.
           (type=string)

setXRep(xrep)

Texture tiling: set the number of x repetitions for this Image.
Parameters:
xrep - The new value in [1, 16].
           (type=int)

setYRep(yrep)

Texture tiling: set the number of y repetitions for this Image.
Parameters:
yrep - The new value in [1, 16].
           (type=int)

Class Variable Details

bindcode

Texture's bind code (readonly).

depth

The pixel depth of the image.

filename

The filename (path) to the image file loaded into this Image object.

name

The name of this Image object.

size

The [width, height] dimensions of the image (in pixels).

xrep

Texture tiling: the number of repetitions in the x (horizontal) axis.

yrep

Texture tiling: the number of repetitions in the y (vertical) axis.

Generated by Epydoc 2.1 on Thu Aug 12 21:47:30 2004 http://epydoc.sf.net