Coder Social home page Coder Social logo

jxr_to_avif's Introduction

About

This is a simple command line tool for converting HDR JPEG-XR files, such as Windows HDR screenshots, to AVIF.

The output format is hardcoded to be 12 bit 4:4:4 for maximum quality. Unfortunately, these files cannot be decoded natively by Windows's AV1 extension, as it only seems to do 8 bit up to 4:4:4 or 10/12 bit up to 4:2:0. However, the files open fine in Chromium.

Usage

jxr_to_avif [--speed n] input.jxr [output.avif]

HDR metadata

The MaxCLL value is calculated almost identically to HDR + WCG Image Viewer by taking the light level of the 99.99 percentile brightest pixel. This is an underestimate of the "real" MaxCLL value calculated according to H.274, so it technically causes some clipping when tone mapping. However, following the spec can lead to a much higher MaxCLL value, which causes e.g. Chromium's tone mapping to significantly dim the entire image, so this trade-off seems to be worth it.

jxr_to_avif's People

Contributors

ledoge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

everthis

jxr_to_avif's Issues

feat: Reverse conversion

Windows will get HDR Desktop backgrounds soon, but sadly only JXR, because... Microsoft I guess... so it would be really nice to have support for the reverse conversion as you can already get HDR images using AVIF for example to get pictures from Movies or some cameras (via RAW) and maybe soon from android phones (via Ultra HDR) and being able to set those as desktop backgrounds would be really cool.

wrong pixel format

I'm trying to convert a JXR screenshot made with nvidia shadowplay screencap feature, but as i type the command
.\jxr_to_avif.exe '.\Red Dead Redemption 2 Screenshot 2024.01.14 - 16.09.17.53.jxr' reddead.avif it prints out the error "Wrong pixel format"
image

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.