FlipBinding.CSharp
1.0.1
dotnet add package FlipBinding.CSharp --version 1.0.1
NuGet\Install-Package FlipBinding.CSharp -Version 1.0.1
<PackageReference Include="FlipBinding.CSharp" Version="1.0.1" />
<PackageVersion Include="FlipBinding.CSharp" Version="1.0.1" />
<PackageReference Include="FlipBinding.CSharp" />
paket add FlipBinding.CSharp --version 1.0.1
#r "nuget: FlipBinding.CSharp, 1.0.1"
#:package FlipBinding.CSharp@1.0.1
#addin nuget:?package=FlipBinding.CSharp&version=1.0.1
#tool nuget:?package=FlipBinding.CSharp&version=1.0.1
FlipBinding.CSharp
A C# binding library for FLIP v1.7. Compatible with Unity.
Installation
NuGet
dotnet add package FlipBinding.CSharp
NuGetForUnity
For macOS, create or edit the following file to configure native runtime settings:
ProjectSettings/Packages/com.github-glitchenzo.nugetforunity/NativeRuntimeSettings.json{ "configurations": [ { "cpuArchitecture": "AnyCPU", "editorCpuArchitecture": "", "editorOperatingSystem": "", "runtime": "osx", "supportedPlatformTargets": [ "StandaloneOSX" ] } ] }Open the NuGetForUnity window via NuGet > Manage NuGet Packages, search for "FlipBinding.CSharp", and click * Install*.
Usage
LDR Image Comparison
using FlipBinding.CSharp;
// Image data is in linear RGB interleaved format [r,g,b,r,g,b,...]
float[] reference = /* reference image */;
float[] test = /* test image */;
var result = Flip.Evaluate(reference, test, width, height);
// Mean error value (0-1, higher means greater difference)
Console.WriteLine($"Mean FLIP error: {result.MeanError}");
// Get per-pixel error value
float pixelError = result.GetPixel(x, y);
HDR Image Comparison
For HDR image comparison, specify useHdr: true:
var result = Flip.Evaluate(reference, test, width, height,
useHdr: true,
tonemapper,
startExposure,
stopExposure,
numExposures);
Magma Color Map
You can get the error map as an RGB color map for visualization:
var result = Flip.Evaluate(reference, test, width, height, applyMagmaMap: true);
// Get RGB values
var (r, g, b) = result.GetPixelRgb(x, y);
API Reference
Flip.Evaluate
public static FlipResult Evaluate(
float[] reference, // Reference image (linear RGB)
float[] test, // Test image (linear RGB)
int width, // Image width
int height, // Image height
bool useHdr = false, // Use HDR-FLIP
float ppd = 67.02f, // Pixels per degree. Default value based on: 0.7m viewing distance, 3840px resolution, 0.7m monitor width.
Tonemapper tonemapper = Tonemapper.Aces,
float startExposure = float.PositiveInfinity,
float stopExposure = float.PositiveInfinity,
int numExposures = -1,
bool applyMagmaMap = false // Apply Magma color map
)
PPD (Pixels Per Degree) Calculation
You can calculate PPD from viewing conditions:
float ppd = Flip.CalculatePpd(
viewingDistance: 0.5f, // Viewing distance (meters)
resolutionX: 2560, // Horizontal resolution (pixels)
monitorWidth: 0.6f // Monitor width (meters)
);
var result = Flip.Evaluate(reference, test, width, height, ppd: ppd);
Notes
- Image data must be in linear RGB. If using sRGB, convert beforehand
- Array size must be
width * height * 3(RGB interleaved format)
License
This library is licensed under the MIT License.
This library includes binary distributions of FLIP v1.7, which is licensed under the BSD 3-Clause License by NVIDIA CORPORATION & AFFILIATES. See THIRD-PARTY-NOTICES.txt for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.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.1 | 50 | 1/15/2026 |
| 1.0.0 | 48 | 1/14/2026 |
| 1.0.0-preview.8 | 37 | 1/14/2026 |