All formats

JPEG XR (JXR, HD Photo)

Full nameJPEG XR (Extended Range), formerly HD Photo and Windows Media Photo
Extensions.jxr, .hdp and .wdp (HD Photo)
MIME typeimage/jxr, image/vnd.ms-photo (HD Photo)
Typeraster image, lossy and lossless compression, HDR (16-bit and 32-bit floating point)
Starts with49 49 BC 01 (II, 0xBC, version 1), a TIFF-like header; the codestream inside starts with WMPHOTO\0 (57 4D 50 48 4F 54 4F 00)
SpecificationITU-T T.832 (identical to ISO/IEC 29199-2)
Reference softwareITU-T T.835, jxrlib (BSD-2-Clause)
Maintained byISO/IEC JTC 1/SC 29 (JPEG committee) and ITU-T; originally Microsoft
Licenseopen; Microsoft grants royalty-free use under its Community Promise

JPEG XR is an image format developed by Microsoft as HD Photo and standardized by JPEG. It compresses images with a block transform similar to JPEG but with less blocking, supports lossy and lossless compression in the same codec, and stores many pixel formats: 8-bit and 16-bit integer, 16-bit half float and 32-bit float per channel, fixed point, CMYK, up to 8 extra channels, and a separate alpha plane.

Today its main use is HDR screenshots on Windows: the Xbox Game Bar (Win+Alt+PrtScn) saves a .jxr file next to a tone-mapped PNG when HDR is on, and the NVIDIA app does the same. Windows reads and writes JPEG XR through the Windows Imaging Component (WIC), and it’s used inside XPS documents and some Microsoft tools. No current web browser supports it; Internet Explorer and the old Edge were the only ones.

When to use JPEG XR#

File structure#

A JPEG XR file uses a container modeled on TIFF: a header, then an IFD (image file directory) of tagged entries that point to the codestream, an optional alpha plane and metadata. All numbers are little-endian.

49 49 BC 01               'II', 0xBC (JPEG XR), version 1
20 00 00 00               offset of the first IFD: 32
...                       IFD: entry count, then 12-byte entries (tag, type, count, value/offset)
57 4D 50 48 4F 54 4F 00   'WMPHOTO\0': start of the image codestream

Common IFD tags:

Tag Name Purpose
0xBC01 PIXEL_FORMAT 16-byte GUID that identifies the pixel format, e.g. 64bpp RGBA half float
0xBC80, 0xBC81 IMAGE_WIDTH, IMAGE_HEIGHT size in pixels
0xBC82, 0xBC83 WIDTH_RESOLUTION, HEIGHT_RESOLUTION DPI as floats
0xBCC0, 0xBCC1 IMAGE_OFFSET, IMAGE_BYTE_COUNT location of the image codestream
0xBCC2, 0xBCC3 ALPHA_OFFSET, ALPHA_BYTE_COUNT location of the separate alpha plane, if any
0x8773 ICC_PROFILE embedded ICC color profile
0x02BC XMP_METADATA XMP packet
0x8769 EXIF_METADATA offset of an Exif IFD

Codestream and compression#

  1. RGB pixels are converted to an internal YUV color space with a reversible integer transform, with optional 4:2:0 or 4:2:2 chroma subsampling.
  2. The image is split into 16x16 macroblocks, grouped into one or more tiles.
  3. A two-stage lapped transform runs on 4x4 blocks: the Photo Core Transform (PCT), an integer transform that’s exactly reversible, plus an optional overlap filter (POT) that reduces block artifacts. The overlap level is 0 (none), 1 or 2.
  4. Coefficients are quantized (no quantization for lossless) and coded in 4 frequency bands: DC, lowpass, highpass and flexbits.
  5. The codestream is stored in spatial mode (macroblocks in order) or frequency mode (all DC first, then lowpass, then highpass), which allows progressive and lower-resolution decoding.

Quality is set as a quantization level or, in jxrlib’s encoder, as a value from 0.0 to 1.0, where 1.0 is lossless.

Converting JPEG XR#

Specifications and documentation#

Software that opens JPEG XR files#

SoftwareWindowsmacOSLinuxWebCanNotes
SumatraPDF✓viewfree, open source
Microsoft Photos✓viewbuilt into Windows; shows HDR screenshots
Windows Imaging Component✓view, convert, createsystem codec used by Windows apps (File Explorer thumbnails, WPF)
Paint.NET✓view, edit, create, convertfree; uses the Windows codec
XnView MP✓✓✓view, convertfree for private use
IrfanView✓view, convertfree for non-commercial use, needs the plugins package
HDR + WCG Image Viewer✓viewfree, open source; shows HDR JXR on HDR displays
jxr_to_png✓convertfree, open source; HDR JXR to HDR PNG
jxrlib tools✓✓✓convert, createJxrEncApp, JxrDecApp, reference command-line tools
ImageMagick✓✓✓convertopen source; needs the jxrlib tools as a delegate

Libraries#

Open-source libraries that read and write JPEG XR. See all JPEG XR libraries for a comparison.

C/C++jxrlib
C#WPF imaging
Pythonimagecodecs
Rustjpegxr