Module Image
source code
The Blender.Image submodule.
Image
New: Image.clampX, Image.clampY.
This module provides access to Image objects in Blender.
Example:
import Blender
from Blender import Image
#
image = Image.Load("/path/to/my/image.png") # load an image file
print "Image from", image.getFilename(),
print "loaded to obj", image.getName())
image.setXRep(4) # set x tiling factor
image.setYRep(2) # set y tiling factor
print "All Images available now:", Image.Get()
|
Image
This object gives access to Images in Blender.
|
Blender Image
|
Load(filename)
Load the image called 'filename' into an Image object. |
source code
|
|
Blender Image
|
New(name,
width,
height,
depth)
Create a new Image object. |
source code
|
|
Blender Image or a list of Blender Images
|
|
Blender Image
|
|
readonly dictionary
|
Sources
The available Image Source.
|
Load the image called 'filename' into an Image object.
- Parameters:
filename (string) - The full path to the image file.
- Returns: Blender Image
- A Blender Image object with the data from filename.
|
Create a new Image object.
- Parameters:
name (string) - The name of the new Image object.
width (int) - The width of the new Image object, between 1 and 5000.
height (int) - The height of the new Image object, between 1 and 5000.
depth (int) - The color depth of the new Image object. (32:RGBA 8bit
channels, 128:RGBA 32bit high dynamic range float channels).
- Returns: Blender Image
- A new Blender Image object.
|
Get the Image object(s) from Blender.
- Parameters:
name (string) - The name of the Image object.
- Returns: Blender Image or a list of Blender Images
- It depends on the name parameter:
-
(name): The Image object called name, None if not
found;
-
(): A list with all Image objects in the current
scene.
|
Get the currently displayed Image from Blenders UV/Image window. When
multiple images are displayed, the last active UV/Image windows image is
used.
- Returns: Blender Image
- The Current Blender Image, If there is no current image it
returns None.
|
Sources
The available Image Source.
-
STILL: Single image file
-
MOVIE: Movie file
-
SEQUENCE: Multiple image files, as sequence
-
GENERATED: Generated image
- Type:
- readonly dictionary
|