Vixen
dd8b0a81
csharp
public record class AssetPreviewImage

A picture of an asset, as pixels rather than as anything that needs a device.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ Bytes and not a TextureData, and not an image number. This travels from a pool thread to the frame thread and is uploaded there, so a contributor that had to hold a texture would have to hold the device — which is the coupling IThumbnailSurface exists to refuse. It is also why this type is here rather than in an assembly that knows what a texture is: a preview is a measurement of a file, and only the editor's own cache turns one into something that draws.

Fields and properties (3)

  • public int Width

    How wide, in pixels.

  • public int Height

    How tall.

  • public byte[] Rgba

    The pixels, four bytes each, top row first — the same layout a decoder produces.

Methods (1)

  • public AssetPreviewImage(int Width, int Height, byte[] Rgba)

    A picture of an asset, as pixels rather than as anything that needs a device.

Used by (3)

  • AssetPreviewVixen.Editor.Core
  • AssetPreviewContributionTestsVixen.Editor.App.Tests
  • ThumbnailCacheVixen.Editor.App