stillleben.ImageLoader class

Multi-threaded image loader.

Contents

This class can be used to quickly load images from a specified directory - in random order. Note: the directory should only contain images.

It currently supports all image file formats supported by Magnum's AnyImageImporter.

Methods

def next(self, /) -> Texture
Return next image (randomly sampled). This is the same as nextRectangleTexture().
def next_rectangle_texture(self, /) -> Texture
Return next image (randomly sampled) as rectangle texture
def next_texture2d(self, /) -> Texture2D
Return next image (randomly sampled) as 2D texture

Special methods

def __init__(self, path: object) -> None
Constructor.

Method documentation

def stillleben.ImageLoader.__init__(self, path: object) -> None

Constructor.

Parameters
path Path to the image directory