Vixen
02b45cc4
csharp
public sealed class StbImageDecoder

Reads the authoring formats artists actually save.

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

Remarks

This is not the ImageSharp doc 01 specified, and the reason is in Directory.Packages.props: ImageSharp 4.0.0 fails the build without a purchased licence key, which an Apache-2.0 engine cannot ask of a contributor who wants to compile the editor. Doc 01 already named StbImageSharp as the fallback and this is it — public domain, and covering more of doc 08's importer table than ImageSharp did, because it reads Radiance HDR.

HDR goes to float and everything else to eight-bit RGBA. A Radiance file holds radiance, which has no upper bound, and narrowing it to a byte at the front door would discard exactly the range an environment map exists for — the sun being ten thousand times the sky is the whole content of the image.

Not read here: .exr, .tif, .webp and .dds, all of which doc 08's table asks for. Doc 01 names Pfim (MIT) for DDS; OpenEXR and TIFF have no licence-clean managed reader worth adding on spec.

Fields and properties (2)

  • public const string HighDynamicRangeExtension

    Radiance HDR, the one format here that carries more range than a byte.

  • public IReadOnlyList<string> Extensions

    Which extensions it reads, lowercase and with their leading dots.

Methods (1)

  • public TextureData Decode(Stream stream, string extension)

    Decodes an image.

Used by (1)

  • ImageDecodersVixen.Editor.Assets