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 color channels.

Type:

int

filepath

filepath associated with this image.

Type:

str

planes

Number of bits per pixel.

Type:

int

ppm

pixels per meter.

Type:

tuple[float, float]

size

size of the image in pixels.

Type:

tuple[int, int]