2. OS X INSTALLATION
In the OS X .zip file there is one “Universal Binary” Adobe File Format plug-in (JPEGXR.plugin) for
both 32-bit and 64-bit versions of Photoshop and all versions of Photoshop Elements.
Copy the plug-in to the appropriate Photoshop plug-in folder; these typically are the following:
Photoshop: /Applications/Adobe Photoshop CS6/Plug-ins/File Formats/
Photoshop Elements: /Applications/Adobe Photoshop Elements 11/Support Files/Plug-
Ins/FileFormats/
Please remember that using the plug-in with applications older than Photoshop CS2 has not been fully
tested and is not supported. There will definitely be limitations in functionality (because only Photoshop
CS2 and later support high dynamic range pixel formats) and it may not work at all with some versions.
You’re welcome to experiment, but we can’t offer any support if you experience problems.
UN-INSTALLING
You can completely remove the plug-in simply by manually deleting the plug-in file.
OPENING JPEG XR FILES
To open any JPEG XR file in Adobe Photoshop, simply select a JPEG XR file (.jxr) from the Open dialog
box. Note that older HD Photo/“Windows Media Photo” files (.hdp/.wdp) are also supported for
reading. The plug-in will automatically select the appropriate Photoshop mode depending on the pixel
format of the JPEG XR file. Likewise, if an alpha channel is present, it will be available in Photoshop. The
JPEG XR plug-in always chooses a Photoshop mode that is directly equivalent to or a superset of the
pixel format of the selected image so no image content is ever discarded when opening a file.
The following table lists the supported JPEG XR pixel formats and the corresponding modes in
Photoshop. JPEG XR pixel formats with n-channel formats are not supported.
JPEG XR Pixel Format Photoshop Mode
1 bpp BlackWhite Bitmap
8 bpp Gray Gray/8
16 bpp Gray Gray/16
16 bpp Gray FixedPoint Gray/32
16 bpp Gray Half Gray/32
32 bpp Gray FixedPoint Gray/32
32 bpp Gray Float Gray/32
16 bpp BGR555 RGB/8
16 bpp BGR565 RGB/8
24 bpp BGR RGB/8
24 bpp RGB RGB/8
32 bpp BGR RGB/8
32 bpp BGRA RGB/8 w/ alpha
32 bpp BGR101010 RGB/16
3. 48 bpp RGB RGB/16
64 bpp RGBA RGB/16 with alpha
48 bpp RGB FixedPoint RGB/32
48 bpp RGB Half RGB/32
96 bpp RGB FixedPoint RGB/32
128 bpp RGB Float RGB/32
32 bpp RGBE RGB/32
32 bpp RGBE RGB/32
64 bpp RGBA FixedPoint RGB/32 w/ alpha
64 bpp RGBA Half RGB/32 w/ alpha
128 bpp RGBA FixedPoint RGB/32 w/ alpha
128 bpp RGBA Float RGB/32 w/ alpha
32 bpp CMYK CMYK/8
40 bpp CMYKA CMYK/8 w/ alpha
64 bpp CMYK CMYK/16
80 bpp CMYKA CMYK/16 w/ alpha
SAVING JPEG XR FILES
When saving an image in JPEG XR format, the plug-in chooses the pixel format appropriate for the
current Photoshop mode. For example, JPEG XR supports numerous pixel formats for high dynamic
range wide gamut (HDR/WG) images. When opening a JPEG XR file in any of these pixel formats, it will
open in the 32-bit mode of Adobe Photoshop (the only mode supporting HDR/WG image editing.)
When saving, the plug-in selects the appropriate JPEG XR pixel format from the subset of pixel formats
that support HDR/WG image content.
In no case will the choice of pixel format discard data content. For example, a JPEG XR file in 24bppBGR
mode will not be saved in 16bppRGB555 mode because each pixel value would be reduced from 8 bits
to 5 bits.
JPEG XR offers a number of encoder parameters in both a “Basic” and “Advanced” mode. The “Basic”
mode lets you specify the compression quality while the “Advanced” mode provides complete control
over most of the JPEG XR encoder parameters, excluding the pixel format. Following is an overview of
the available encoder options for the JPEG XR plug-in. (Note that only the “Basic” mode is available on
64-bit OS X.)
Basic Settings
Quality controls the amount of lossy compression used to save the file. Larger values (moving the slider
to the right) create higher quality image files. A value of 1.0 creates a losslessly encoded file that will
decode to produce an image that is exactly the same as the original encoded data. Smaller values
(moving the slider to the left) create smaller files at the expense of lossy image quality. The exact image
quality and file size is highly dependent on the specific image content and mode (pixel format) and
cannot be predicted. In general, it’s recommended to use values greater than 0.5. Experimentation is
recommended to choose the tradeoff between file size and image quality that is most appropriate for
your specific needs.
4. The Lossless checkbox overrides the Quality setting, saving the file in a mathematically lossless format.
The decoded image will be exactly the same as the originally encode file. Enabling Lossless mode is
identical to setting Quality to 1.0.
Advanced Settings (not available on 64-bit OS X)
The Advanced Settings provide a much greater degree of control over the encoder than using the Basic
Settings, including the availability of several advanced features.
There are three parameters that control the tradeoffs between image quality and compressed file size. In
addition to their individual effect, it’s also important to understand how these three parameters interact
with each other.
Quantization (1-255)
One of the principal ways lossy compression is achieved is to “quantize” a set of continuous values into a
smaller set of representative values. In this way, “loss” is achieved by mapping values that are close
together to the same value. Only the remaining set of values needs to be coded and saved, reducing the
amount of storage required. The greater the degree of quantization, the more the content can be
compressed, but in doing so, more of the small differences among similar values are lost.
Quantization basically defines the amount of similarity that can be discarded. It is an arbitrary range
from 1-255. Quantization does not correspond directly to any specific difference amount; it determines
the desired image quality rather than the desired compression ratio. The actual compression ratio is a
function of both the quantization and the image content; images with less complex content will have
fewer differences among values and will achieve better compression without the need for greater
quantization. Additionally, the quantization is also highly dependent on the specific pixel format, most
importantly the bit depth. Higher values will be required on greater bit depths to achieve a comparable
compression ratio, since larger bit depths provide a greater range of possible values and therefore will
need more quantization.
JPEG XR provides the unique capability of preserving all data values during quantization, effectively
providing mathematically lossless compression. When Quantization is set to 1, no values are discarded
and all encoded pixel values will be returned with absolutely no loss. Selecting the Lossless checkbox
will produce the same result as setting Quantization to 1.
Note there are separate Quantization values for Y (Luminance), U (Cb), and V (Cr) encoding.
Typically the Luminance would be set somewhat lower than the Chrominance to preserve contrast more
carefully than color.
Color Subsampling (4:4:4, 4:2:2 or 4:2:0)
The JPEG XR plug-in allows you to reduce the resolution of the chrominance of an image prior to the
quantization process. Reducing the chrominance resolution, or chroma sub-sampling, has long been
understood as an effective way to reduce image content with very little perceptible degradation. In fact,
virtually all television or video you watch, whether analog or digital, takes advantage of chroma sub-
sampling to reduce the required bandwidth. The most common implementations of the JPEG
5. compression format always use chroma sub-sampling as well. In fact, the unique capability of JPEG XR
is not that it provides chroma sub-sampling, but that it provides a mechanism for you to reduce or
eliminate this technique to improve image quality. Of course, this only applies to RGB color images.
An image is first reorganized from RGB into a channel for luminance and two channels to describe the
color information (or chrominance.) If all chrominance is discarded, what’s left is a monochrome image.
Typically, you don’t want to go that far!
Many video systems, as well as the JPEG compression format (or at least the most common variant of it
that we all use) discards 75% of the chrominance information. The resolution of the color information is
reduced by a factor of two in both dimensions. So every four pixels in an image are represented by four
luminance values but only two (one for each chroma channel) chrominance values. What started out as
12 values (four pixels with three channels each) has been cut in half; only 6 values (four luminance values
and two chrominance values) have to be saved.
In the world of digital imaging, this is referred to as 4:2:0 chroma sub-sampling, or more simply as 4:2:0.
When all chrominance information is retained (no values are discarded), this is referred to as 4:4:4.
Another popular approach, particularly for professional video applications, is to only discard 50% of the
chroma values; two values for each chroma channel, or four values in total are retained. This is referred
to as 4:2:2. JPEG XR supports all three of these modes Color Subsampling modes.
4:4:4 All color information is retained, assuring full resolution of the chrominance information.
This is the default and is the recommended setting to achieve the best overall image
quality. Whenever an image is stored as an intermediate format and further editing is
anticipated, it is highly recommended to use 4:4:4.
4:2:2 The color information is encoded at ½ the resolution of the luminance information. Four
each set of four pixels, four luminance values are used and the eight chrominance values
are reduced down to four (two for each chroma channel.) This provides perceptively
lossless color encoding for the final delivery of an image. However, if further editing of
the image is anticipated, it’s recommended than any chroma sub-sampling be avoided.
4:2:0 The color information is encoded at ¼ the resolution of the luminance information. Four
each set of four pixels, four luminance values are used and the eight chrominance values
are reduced down to two (one for each chroma channel.) This is the same sub-sampling
used by most implementations of JPEG. When converting a JPEG file to JPEG XR with
no additional editing planned, there is no need to specify a higher chroma sub-sampling
mode than 4:2:0.
Unless there is a specific requirement to do otherwise, it is recommended to always use the 4:4:4 mode.
The codec can typically do a much better job of preserving image quality when it is provided all the
information and can make its own decisions on what to retain and what to discard. However, if the source
image content is known to already be sub-sampled (for example an unmodified JPEG image) and no
further image editing is anticipated, then there is no reason to not specify the equivalent sub-sampled
mode (4:2:0) for JPEG XR.
Overlap (None, One Level, Two Levels)
6. JPEG XR uses an advanced version of a macro-block based compression scheme. To achieve the best
performance and minimize the amount of memory required to encode or decode an image, the overall
image is subdivided into a set of 16x16 pixel macro blocks. Each macro block is further divided into four
4x4 pixel blocks. All image encoding and decoding operations are performed on these blocks and macro-
blocks. As a result, for high quantization values (when we are discarding a more of the similarly valued
pixels), the steps between blocks and macro blocks may become visible as artifacts in the compressed
image. This is very common with JPEG (which also uses macro blocks) and significantly reduces the
amount of compression that can be used without creating these visible artifacts.
JPEG XR addresses this problem through a combination of better quantization and an additional step of
overlap processing. This overlap processing takes into account the values of pixels in neighboring blocks
and macro blocks when choosing the quantization values that represent similar adjacent pixels. By doing
so, the visible differences among adjacent blocks and macro blocks are dramatically reduced.
Two levels of optional overlap processing can be specified. One Level Overlap is performed at the 4x4
block level. For all pixels in the block, bordering pixels in adjacent blocks are also evaluated when
choosing the quantization values for that block. Two Level Overlap also analyzes neighboring adjacent
pixels when choosing quantization values at the 16x16 macro-block level.
One Level Overlap should be used for most typical encoding scenarios. For very high quantization
levels, Two Level Overlap may be appropriate, but this will trade off the potential for macro block
artifacts for a loss of image detail. Setting this control to None suppresses any overlap processing. This
can speed performance, but is only recommended for very low quantization values. Specific quantization
thresholds for choosing the appropriate level of Overlap are highly dependent on the image content and
cannot be predicted. Trial and error will be your best guide. But when in doubt, stick with the default of
One Level Overlap processing.
Tiling
JPEG XR allows an image to be subdivided into individual rectangular tiles. Each tile is stored in the
compressed bit stream as a self-describing sub-picture. This makes it possible to decode a tile without
ever having to process the compressed data for any other tile. The main purpose for this feature is to
optimize an image for region decoding. The request to decode an arbitrary region only needs to process
the tiles that represent that region.
Setting the Tiling parameter to None effectively disables tiling. (The entire image is a single tile.)
When this parameter is set to values other than None, the image is sliced into columns and rows of the
requested size, spacing them as evenly as possible. Tiles are always a multiple of macro blocks (16x16
pixels.) If the image width or height is not evenly divisible in macro block increments by the requested
column and row size, the right-most column and/or bottom-most row will be re-sized accordingly. The
remaining columns and rows will always be of uniform width and height. Columns cannot be less than
one macro block in width and rows cannot be less than one macro block in height.
In general, a tile size of 512x512 pixels is recommended. This represents a good trade-off between
efficient region-of-interest decoding and slight loss of compression efficiency.
7. Soft or Hard Tiling
“Soft” tiling (the default) means that the overlapping of the transforms for the block regions in the
image also includes overlapping across the tile boundaries. “Hard” tiling means that the tile boundaries
are treated like image boundaries – i.e. that no overlapping happens at those boundaries. Soft tiles are
superior in terms of compression. Hard tiles can cause visual boundary artifacts, but make it a bit more
efficient to access specific regions in images.
Bitstream Ordering
JPEG XR makes it possible to organize the compressed image data sequentially in either spatial or
frequency order. Spatial Bitstream Ordering is the typical choice for encoding by a device (such as a
point&shoot camera). The sequential compressed data stream represents the image in macro block rows
starting at the upper left corner, from left to right and from top to bottom. It allows the image to be
encoded sequentially in rows of pixels, minimizing the total memory required.
Frequency Bitstream Ordering groups the data in three different frequency bands, plus an optional
fourth band of detail information, and places them sequentially in the file starting with the low frequency
information, followed by the middle frequency, then by the high frequency information, and if present,
the fine detail information. Frequency Bitstream Ordering makes it much more efficient to decode a
low resolution version of the image, minimizing the amount of compressed image data that must be
parsed to find the required low frequency content. When encoding on a typical personal computer, the
performance difference between encoding in frequency order vs. spatial order is insignificant.
Frequency Bitstream Ordering is typically preferred because of the performance benefits when
decoding the image to lower resolutions.
Progressive Mode
When Frequency Bitstream Ordering is used, JPEG XR makes it possible to encode the image
progressively, i.e. starting with the DC component, then the LP (low-pass) frequencies, and finally the
HP (high-pass) frequencies. This allows progressive mode aware clients, such as Internet Explorer 10,
to decode and display large images quickly. The initial image may be blurry, but gets progressively
sharper as it is downloaded.
Pixel Format
As described above, the appropriate destination Pixel Format is automatically chosen when saving an
image. The specific pixel format will depend on the Photoshop image mode. Changing the image mode
in Photoshop will make a different pixel format available when saving. The current pixel format is
displayed in the “Information & Warnings” box.
JPEG XR provides excellent support for high dynamic range, wide gamut images when using
Photoshop’s 32-bit mode. From this mode, RGB or monochrome images will be stored in 32-bit floating
point JPEG XR files. This format supports high dynamic range and wide gamut.
8. Alpha
When the source data contains an alpha channel, JPEG XR will allow the Alpha channel to be saved
using different quality and bit stream ordering parameters than the RGB image. For example, it may be
appropriate to use lossy compression for the image, but choose lossless (or a higher quality lossy) for the
alpha channel to insure an artifact-free composite.
METADATA
All metadata supported by JPEG XR is accessible from within Adobe Photoshop. Additionally, because
JPEG XR supports XMP, any additional metadata added or edited with Adobe Photoshop will be correctly
saved in the JPEG XR file.
SUPPORT AND FEEDBACK
This plug-in is a free, unsupported utility from Microsoft Corporation. While not officially supported
through Microsoft’s Product Support Services (PSS) organization, our goal is to quickly respond to
problems and fix any bugs. All comments, bug reports, suggestions, or other feedback should be sent
directly to the Microsoft JPEG XR development team at hdview@microsoft.com.
ACKNOWLEDGEMENTS
Microsoft is very grateful to the assistance provided by Adobe Systems Incorporated
(http://www.adobe.com). Additionally, Microsoft appreciates the excellent contributions of Pegasus
Imaging Corporation (http://www.pegasusimaging.com) who participated directly in the earlier
development of the HD Photo plug-ins for Adobe® Photoshop® software on which this plug-in is based.