Table of Contents

Class LoadImage

Namespace
Bonsai.Shaders
Assembly
Bonsai.Shaders.dll

Represents an operator that loads a texture buffer from the specified image file.

public class LoadImage : Source<Texture>
Inheritance
LoadImage
Inherited Members

Properties

ColorType

Gets or sets a value specifying the color type of the loaded image.

public LoadImageFlags ColorType { get; set; }

Property Value

LoadImageFlags

FileName

Gets or sets the name of the image file.

[FileNameFilter("Image Files|*.png;*.bmp;*.jpg;*.jpeg;*.tif;*.tiff;*.exr|PNG Files|*.png|BMP Files|*.bmp|JPEG Files|*.jpg;*.jpeg|TIFF Files|*.tif;*.tiff|EXR Files|*.exr|All Files|*.*")]
public string FileName { get; set; }

Property Value

string

FlipMode

Gets or sets a value specifying the flip mode applied to the loaded image.

public FlipMode? FlipMode { get; set; }

Property Value

FlipMode?

Height

Gets or sets the height of the texture. If no value is specified, the texture buffer will not be initialized.

public int? Height { get; set; }

Property Value

int?

InternalFormat

Gets or sets a value specifying the internal pixel format of the texture.

public PixelInternalFormat InternalFormat { get; set; }

Property Value

PixelInternalFormat

MagFilter

Gets or sets a value specifying the texture magnification filter.

public TextureMagFilter MagFilter { get; set; }

Property Value

TextureMagFilter

MinFilter

Gets or sets a value specifying the texture minification filter.

public TextureMinFilter MinFilter { get; set; }

Property Value

TextureMinFilter

Width

Gets or sets the width of the texture. If no value is specified, the texture buffer will not be initialized.

public int? Width { get; set; }

Property Value

int?

WrapS

Gets or sets a value specifying wrapping parameters for the column coordinates of the texture sampler.

public TextureWrapMode WrapS { get; set; }

Property Value

TextureWrapMode

WrapT

Gets or sets a value specifying wrapping parameters for the row coordinates of the texture sampler.

public TextureWrapMode WrapT { get; set; }

Property Value

TextureWrapMode

Methods

Generate()

Generates an observable sequence that returns a texture buffer loaded from the specified image file.

public override IObservable<Texture> Generate()

Returns

IObservable<Texture>

A sequence containing a single instance of the Texture class representing the data loaded from the specified image file.

Generate<TSource>(IObservable<TSource>)

Returns a texture buffer loaded from the specified image file whenever an observable sequence emits a notification.

public IObservable<Texture> Generate<TSource>(IObservable<TSource> source)

Parameters

source IObservable<TSource>

The sequence containing the notifications used to start loading a new texture buffer from the specified image file.

Returns

IObservable<Texture>

The sequence of Texture objects loaded from the specified image file whenever the source sequence emits a notification.

Type Parameters

TSource

The type of the elements in the source sequence.