Image Buffer Types (imbuf.types)#

This module provides access to image buffer types.

Note

Image buffer is also the structure used by bpy.types.Image ID type to store and manipulate image data at runtime.

class imbuf.types.ImBuf#
copy()#
Returns:

A copy of the image.

Return type:

ImBuf

crop(min, max)#

Crop the image.

Parameters:
  • min (pair of ints) – X, Y minimum.

  • max (pair of ints) – X, Y maximum.

free()#

Clear image data immediately (causing an error on re-use).

resize(size, method='FAST')#

Resize the image.

Parameters:
  • size (pair of ints) – New size.

  • method (str) – Method of resizing (‘FAST’, ‘BILINEAR’)

channels#

Number of bit-planes.

Type:

int

filepath#

filepath associated with this image.

Type:

string

planes#

Number of bits associated with this image.

Type:

int

ppm#

pixels per meter.

Type:

pair of floats

size#

size of the image in pixels.

Type:

pair of ints