Image(ID)

base classes — bpy_struct, ID

class bpy.types.Image(ID)

Image datablock referencing an external or packed image

bindcode

OpenGL bindcode

Type :int in [0, inf], default 0, (readonly)
depth

Image bit depth

Type :int in [0, inf], default 0, (readonly)
display_aspect

Display Aspect for this image, does not affect rendering

Type :float array of 2 items in [0.1, 5000], default (0.0, 0.0)
field_order

Order of video fields. Select which lines are displayed first

Type :enum in [‘EVEN’, ‘ODD’], default ‘EVEN’
file_format

Format used for re-saving this file

Type :enum in [‘BMP’, ‘IRIS’, ‘PNG’, ‘JPEG’, ‘TARGA’, ‘TARGA_RAW’, ‘AVI_JPEG’, ‘AVI_RAW’, ‘FRAMESERVER’], default ‘TARGA’
filepath

Image/Movie file name

Type :string, default “”
filepath_raw

Image/Movie file name (without data refreshing)

Type :string, default “”
fps

Speed of the animation in frames per second

Type :int in [1, 100], default 0
frame_end

End frame of an animated texture

Type :int in [0, 128], default 0
frame_start

Start frame of an animated texture

Type :int in [0, 128], default 0
generated_height

Generated image height

Type :int in [1, 16384], default 0
generated_type

Generated image type

Type :enum in [‘BLANK’, ‘UV_GRID’, ‘COLOR_GRID’], default ‘BLANK’
generated_width

Generated image width

Type :int in [1, 16384], default 0
has_data

True if this image has data

Type :boolean, default False, (readonly)
is_dirty

Image has changed and is not saved

Type :boolean, default False, (readonly)
mapping

Mapping type to use for this image in the game engine

Type :enum in [‘UV’, ‘REFLECTION’], default ‘UV’
packed_file
Type :PackedFile, (readonly)
pixels

Image pixels in floating point values

Type :float in [-inf, inf], default 0.0
size

Width and height in pixels, zero when image data cant be loaded

Type :int array of 2 items in [-inf, inf], default (0, 0), (readonly)
source

Where the image comes from

Type :enum in [‘FILE’, ‘SEQUENCE’, ‘MOVIE’, ‘GENERATED’, ‘VIEWER’], default ‘FILE’
tiles_x

Degree of repetition in the X direction

Type :int in [1, 16], default 0
tiles_y

Degree of repetition in the Y direction

Type :int in [1, 16], default 0
type

How to generate the image

Type :enum in [‘IMAGE’, ‘MULTILAYER’, ‘UV_TEST’, ‘RENDER_RESULT’, ‘COMPOSITING’], default ‘IMAGE’, (readonly)
use_animation

Use as animated texture in the game engine

Type :boolean, default False
use_clamp_x

Disable texture repeating horizontally

Type :boolean, default False
use_clamp_y

Disable texture repeating vertically

Type :boolean, default False
use_fields

Use fields of the image

Type :boolean, default False
use_premultiply

Convert RGB from key alpha to premultiplied alpha

Type :boolean, default False
use_tiles

Use of tilemode for faces (default shift-LMB to pick the tile for selected faces)

Type :boolean, default False
save_render(filepath, scene=None)

Save image to a specific path using a scenes render settings

Parameters:
  • filepath (string) – Save path.
  • scene (Scene, (optional)) – Scene to take image parameters from
save()

Save image to its source path

reload()

Reload the image from its source path

update()

Update the display image from the floating point buffer

gl_load(filter=9985, mag=9729)

Load the image into OpenGL graphics memory

Parameters:
  • filter (int in [-inf, inf], (optional)) – Filter, The texture minifying function
  • mag (int in [-inf, inf], (optional)) – Magnification, The texture magnification function
Returns:

Error, OpenGL error value

Return type:

int in [-inf, inf]

gl_free()

Free the image from OpenGL graphics memory

Inherited Properties

Inherited Functions

References

Previous topic

IKParam(bpy_struct)

Next topic

ImagePaint(Paint)