Giter Site home page Giter Site logo

mojiatec / hdrimageviewer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 13thsymphony/hdrimageviewer

0.0 0.0 0.0 17.02 MB

UWP app to view high dynamic range (HDR) and wide color gamut (WCG) images.

Home Page: https://13thsymphony.github.io/

License: MIT License

C++ 77.58% C 0.33% C# 17.90% HLSL 4.19%

hdrimageviewer's Introduction


HDR + WCG Image Viewer

Logo

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.


About the Project

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).

Running the app

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.

Display hardware

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:

Command line usage

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.

Parameters

-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.0
  • gamma: 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

Example

HDRImageViewer.exe -f -h -input:myimage.jxr

Compiling the app

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.

(VS2019 probably works, too, but this is untested)

Manually including the libheif package

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:

  1. In Visual Studio, go to Tools > NuGet Package Manager > Package Manager Settings.
  2. In the Package Sources page, add the libheif-vcpkg directory as a new source.

Visual Studio should show something similar to:

libheif-vcpkg local Nuget package source

Acknowledgments

This app includes source, object code, and/or techniques from many excellent sources, including but not limited the following:

3rd party licenses can be found in the 3rdparty directory.

hdrimageviewer's People

Contributors

13thsymphony avatar imbushuo avatar daspr-microsoft avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.