fork has been archived due to me not wanting to continue work on it because I do not like the codebase and its reliance on too many Microsoft specific features
- for safety uninstall the original HDR + WCG Image Viewer first
- enable developer mode
- unpack the archive somewhere safe as you cannot delete it after installing the app
- open the
_install.ps1
file inside the unpacked folder. this will install it - done :)
if you get the error that Microsoft.UI.Xaml.2.8
was not found, follow these instructions:
- install winget if not already installed
- enable the execution alias of it (Settings -> Apps -> Advanced App settings)
- open the
_install.ps1
file again - it should install the needed dependency
- remove the maxCLL calculation being limited by the windows size as best as possible
- a lot more accurate maxCLL detection
- added my heatmap as an additional option
- added my colour space map
- more accurate colour space conversions
- app will not crash with images that are too large anymore (thx @Pumbo)
explanation of heatmap and colour space map colours
Windows 10/11 app for viewing high dynamic range (HDR) and wide color gamut (WCG) images at full quality on a capable HDR10 or WCG display.
Get app from the Microsoft Store
·
App support page
NOTE: Currently the Store version lags significantly behind this repo.
This is a Universal Windows Platform (UWP) app that uses DirectX Advanced Color to decode and render HDR image formats at the best available quality on a supported HDR10 display.
Supported formats include:
- OpenEXR
- Radiance RGBE (.hdr)
- JPEG XR (including Xbox and Windows variants)
- HEIC with HDR10/BT.2100 data
- AVIF with HDR10/BT.2100 data
- EXPERIMENTAL: Apple HDR GainMap images using HEIC and JPEG
- JPEG, PNG and other SDR formats with wide gamut and/or color profile information
The app performs luminance display mapping/tone mapping to adapt an HDR image to the capability of the display. It also includes some useful tools for HDR developers such as rendering the image luminance as a colorized heatmap, or forcing an image to be interpreted with a specific colorspace (for example, PNG images encoded as HDR10).
The minimum requirements to run the app are a recent version of Windows 10 or 11 (19H1 or greater) and a GPU that supports DirectX 11. You should also update your graphics (WDDM) driver.
If you use an SDR display the app will use tone mapping to render any HDR images to the best of its ability. You will obviously need a Windows-compatible HDR display to experience a benefit from HDR images.
HDR displays vary greatly in quality - low quality models offer no real benefit over SDR and in fact often screw up color and graphics rendering as to make it look worse than SDR. For best results a certified display is strongly recommended, including:
If you are loading an image using the -input
argument you must invoke HDRImageViewer from the directory containing the image you wish to load - UWP apps launched from a command line only have access to files within the working directory.
-f
Start in fullscreen mode
-h
Start with UI hidden
-forcebt2100
Force images to use BT.2100 PQ color space (BT.2020 primaries, ST.2084/PQ transfer function)
-input:filename
Load filename
Note: Filename must be relative to the current working directory as HDRImageViewer only has access to that directory.
-colorprofile:r_x,r_y,g_x,g_y,b_x,b_y,w_X,w_Z,gamma
Use a custom color space defined by RGBW primaries and gamma
r_x,r_y,g_x,g_y,b_x,b_y
: CIExyY x and y coordinates of the red/green/blue primaries.w_X,w_Z
: CIEXYZ X and Z coordinates of the whitepoint, normalized to Y = 1.0gamma
: Enumeration, use 0 for 2.2/sRGB, 1 for 1.0/linear. BT.2100 PQ transfer function is not yet supported, use-forcebt2100
instead.
-rendereffect:[effect]
Force a render effect. Valid values are:
none
hdrtonemap
sdroverlay
maxluminance
luminanceheatmap
HDRImageViewer.exe -f -h -input:myimage.jxr
You'll need Visual Studio 2022 with the following workloads installed:
Desktop Development with C++
Universal Windows Platform Development
- In Optional Components, make sure
C++ (v143) Universal Windows Platform tools
is checked.
- In Optional Components, make sure
(VS2019 probably works, too, but this is untested)
The repo contains a copy of libheif built using vcpkg and exported into a local NuGet package at \libheif-vcpkg\vcpkg-export-20210528-221932.1.0.0.nupkg
. Libheif is consumed by HDRImageViewer as a dynamic link library to comply with requirements of the LGPL license.
You must manually add the libheif-vcpkg
directory to Visual Studio's list of NuGet package repositories:
- In Visual Studio, go to
Tools > NuGet Package Manager > Package Manager Settings
. - In the
Package Sources
page, add thelibheif-vcpkg
directory as a new source.
Visual Studio should show something similar to:
This app includes source, object code, and/or techniques from many excellent sources, including but not limited the following:
- D2DAdvancedColorImages SDK sample.
- Rick Manning's HDR Image Viewer.
- DirectXTex.
- OpenEXR.
- zlib.
- libheif.
3rd party licenses can be found in the 3rdparty
directory.