SharpEXR 1.0.0.11

.NET Standard 2.0
There is a newer version of this package available.
See the version list below for details.
NuGet\Install-Package SharpEXR -Version 1.0.0.11
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
dotnet add package SharpEXR --version 1.0.0.11
<PackageReference Include="SharpEXR" Version="1.0.0.11" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SharpEXR --version 1.0.0.11
#r "nuget: SharpEXR, 1.0.0.11"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install SharpEXR as a Cake Addin
#addin nuget:?package=SharpEXR&version=1.0.0.11

// Install SharpEXR as a Cake Tool
#tool nuget:?package=SharpEXR&version=1.0.0.11

SharpEXR

C# implementation of OpenEXR file format, a high dynamic range imaging image file format created by Industrial Light and Magic (ILM).

Currently only reads single part files with uncompressed scanlines.

Example Usage

var filePath = "somefile.exr";

// load the EXR file headers and parts, but not actual pixel data
var exrFile = EXRFile.FromFile(filePath);
var part = exrFile.Parts[0];

// read pixel data for first part in file
// synchronously, slower
//part.Open(filePath);

// open part while reading pixel data in parallel
part.OpenParallel(filePath);

// get pixel data as an array of RGBA unsigned bytes,
//   auto detecting source format,
//   converted to sRGB (screen) color space,
//   premultiplying RGB values by alpha values
byte[] bytes = part.GetBytes(ImageDestFormat.PremultipliedBGRA8, GammaEncoding.sRGB);

// get pixel data as an array of BGR 16 bit floats,
//   auto detecting source format,
//   converted to Gamma color space,
//   not including alpha channel
Half[] halfs = part.GetHalfs(ChannelConfiguration.BGR, false, GammaEncoding.Gamma, false);

// get pixel data as an array of RGBA 32 bit floats,
//   auto detecting source format,
//   not converted (linear color space),
//   including alpha but not premultiplied
float[] floats = part.GetFloats(ChannelConfiguration.RGB, true, GammaEncoding.Linear, true);

// close part
part.Close();

Saving

Saving files is currently not supported.

Single-threaded Load

The project is compiled with the PARALLEL conditional set by default. Removing this conditional compilation symbol will force the library to read image scanlines sequentially instead of in parallel. This is much slower and not recommended.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0.19 1,269 7/31/2020
1.0.0.16 349 4/3/2020
1.0.0.14 281 4/2/2020
1.0.0.11 299 4/2/2020