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 (tuple[int, int]) – X, Y minimum.

  • max (tuple[int, int]) – X, Y maximum.

free()

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

resize(size, method='FAST')

Resize the image.

Parameters:
  • size (tuple[int, int]) – New size.

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

channels

Number of bit-planes.

Type:

int

filepath

filepath associated with this image.

Type:

str

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