Ex tenuī filo lucis texor
A pure C# image & texture library — decode, encode, and convert between formats.
using var sourceStream = File.OpenRead("input.exr");
var sourceCodec = new ExrCodec();
var reader = sourceCodec.OpenReader(sourceStream);
var targetCodec = new PngCodec();
var plan = ConversionPlanner.Plan(reader.Describe(), targetCodec.Capabilities, ConversionPolicy.Preview).Plan!;
using var targetStream = File.Create("output.png");
var writer = targetCodec.CreateWriter(targetStream, plan.TargetDescriptor);
ConversionExecutor.Execute(plan, reader, sourceCodec.Capabilities.SampleByteOrder, writer, targetCodec.Capabilities.SampleByteOrder);A runnable version of this lives in examples/Lucitex.Example.