HD Photo
From Wikipedia, the free encyclopedia
Filename extension | .hdp (formerly .wdp) |
---|---|
Internet media type | image/vnd.ms-photo |
Developed by | Microsoft |
Type of format | graphics file format |
HD Photo (formerly Windows Media Photo) is a still-image compression algorithm and file format for continuous tone photographic images, developed and patented by Microsoft as a part of the Windows Media family. It supports lossy as well as lossless compression, and is the preferred image format for Microsoft's XPS documents. It was previously known internally as Photon. Software support for the format is not widespread as of early 2007; however, official managed code and unmanaged code implementations of the codec are available as part of .NET Framework 3.0 and Windows Imaging Component respectively. Both components are part of Windows Vista and are available for Windows XP.
HD Photo has been announced by Microsoft and the Joint Photographic Experts Group to be under consideration for a JPEG standard, titled JPEG XR.[1] JPEG XR (ISO/IEC 29199-2, JPEG XR Image Coding Specification), based on Microsoft’s HD Photo proposal, reached the Final committee Draft (FCD) balloting phase in the ISO/IEC JTC1/SC29/WG1 workgroup.[2]
Contents |
[edit] Description
HD Photo is an image codec that gives a high-dynamic-range image encoding while requiring only integer operations (with no divides) for both compression and decompression. It supports monochrome, RGB, CMYK and even n-channel color representation, using up to 16-bit unsigned integer representation, or up to 32-bit fixed point or floating point representation, and also supports RGBE (Radiance). It may optionally include an embedded ICC color profile, to achieve consistent color representation across multiple devices. An alpha channel may be present for transparency, and Exif and XMP metadata formats are supported. The format allows decoding part of an image, without decoding the entire image. Full decoding is also unnecessary for certain operations such as cropping, downsampling, horizontal or vertical flips, or cardinal rotations.
All color representations are transformed to an internal color representation. The transformation is entirely reversible, so, by using appropriate quantizers, both lossy and lossless compression can be achieved.
[edit] Container format
HD Photo uses a TIFF-like file container to store image data in a table of Image File Directory (IFD) tags. An HD Photo file contains image data, optional alpha channel data, HD Photo metadata, optional XMP metadata stored as RDF/XML, and optional Exif metadata, in IFD tags. The image data is a contiguous self-contained chunk of data. The optional alpha channel, if present, is compressed as a separate image record, enabling decoding of the image data independently of transparency data in applications which do not support transparency.
Being TIFF-based, this format inherits all of the limitations of the TIFF format including the 4 GB file-size limit, which according to the HD Photo specification "will be addressed in a future update".[3]
[edit] Compression algorithm
At a high level, HD Photo's design is very similar to JPEG: the source image is optionally converted to a luma-chroma colorspace, the chroma planes are optionally subsampled, each plane is divided into fixed-size blocks, the blocks are transformed into the frequency domain, and the frequency coefficients are quantized and entropy coded. Major differences include the following:
- JPEG supports bit depths of 8 and 12 bits; HD Photo supports bit depths of up to 32 bits. HD Photo also supports lossless compression of floating-point image data; this works by representing the floating-point values in an IEEE 754-like format, and encoding them as though they were integers.
- JFIF specifies a linear transformation from RGB to YCbCr, which is slightly lossy in practice because of roundoff error. HD Photo specifies a lossless colorspace transformation, given (for RGB) by
- While JPEG uses 8×8 blocks for its frequency transformation, HD Photo uses 4×4 blocks. 2×4 and 2×2 transformations are also defined for special cases.
- The DCT, the frequency transformation used by JPEG, is slightly lossy because of roundoff error. HD Photo uses a transformation called the Photo Core Transform (PCT), a type of Hadamard transform, which resembles a 4×4 DCT but is lossless.
- HD Photo allows an optional prefiltering step before the PCT. This filter has a visual blurring effect, but like the PCT it is lossless. The filter operates on 4×4 blocks which are offset by 2 pixels in each direction from the PCT blocks. Its purpose is to reduce block-boundary artifacts at low bitrates. At high bitrates, where such artifacts are typically not a problem, the prefiltering can be omitted to reduce encoding and decoding time.
- In JPEG, the image DC components from the DCT are encoded by left-prediction. In HD Photo, blocks are grouped into macroblocks of 16×16 pixels, and the DC components from each macroblock are passed though another level of frequency transformation, leaving three types of coefficients to be entropy coded: the macroblock DC coefficients (called DC), macroblock-level AC coefficients (called "lowpass"), and lower-level AC coefficients (called AC).
- HD Photo's entropy coding phase is far more complex than JPEG's, involving a more advanced DC prediction algorithm, adaptive coefficient reordering (in contrast to JPEG's fixed zigzag ordering), and a form of adaptive Huffman coding for the coefficients themselves.
- JPEG uses a single quantization coefficient per DC/AC component per color plane per image. HD Photo has a similar restriction for DC quantization, but allows lowpass and AC quantization coefficients to vary from macroblock to macroblock.
- Because all encoding phases except quantization are lossless, HD Photo is lossless when all quantization coefficients are equal to 1. This is not true of JPEG. JPEG defines a separate lossless mode which does not use the DCT, but it is not implemented by libjpeg and therefore not widely supported.
The HD Photo bitstream specification claims that "HD Photo offers image quality comparable to JPEG-2000 with computational and memory performance more closely comparable to JPEG", that it "delivers a lossy compressed image of better perceptive quality than JPEG at less than half the file size", and that "lossless compressed images … are typically 2.5 times smaller than the original uncompressed data".
[edit] Software support
- Adobe Photoshop CS2/CS3, Windows and Mac, supports opening and saving HD Photo images via a plugin from Microsoft.
- DBGallery - supports HD Photo in viewing, reading and writing IPTC/XMP metadata, emailing and all its other features. (Windows only, including x32 and x64)
- Microsoft Expression Design supports importing and exporting HD Photo images using WIC. Expression Media supports importing HD Photo images.
- IrfanView 4.10 supports importing HD Photo images via a beta plugin.
- Paint.NET 3.20 supports importing and exporting HD Photo images via a plugin. [4]
- XnView supports HD Photo via a plugin.
- Windows Live Photo Gallery can be used to view HD Photo images on Windows XP and Windows Vista.
- Windows Vista has native HD Photo viewing support in Windows Explorer and Windows Photo Gallery.
- FastPictureViewer 1.0 has native HD Photo viewing / metadata support on Windows Vista, Windows Server 2008 and Windows XP SP3 (and Windows XP SP2 through WIC).[5]
- Windows Imaging Component, aka WIC, is an imaging framework providing HD Photo support to Windows XP SP2 and later for WIC-compliant applications.
- Xara Xtreme Pro 4 Supports HD Photo Import [6]
- Zoner Photo Studio - supports HD Photo editing (8 and 16 bits per channel), reading and writing of metadata.
[edit] Licensing
Microsoft has patents on the technology in HD Photo. A Microsoft representative stated in a January 2007 interview that in order to encourage the adoption and use of HD Photo, the specification is made available under the Microsoft Open Specification Promise, which asserts that Microsoft offers the specification for free, and will not file suit on the patented technology, and that open-source software can therefore make use of the format.[7] as stated by to Josh Weisberg, director of Microsoft's Rich Media Group. However, as of Microsoft's September 9, 2008 update, HD Photo is still not among the technologies that Microsoft has listed as being covered by the Open Specification Promise.[8]
In addition to the specification itself, Microsoft released the "HD Photo Device Porting Kit" which provides source code and build configuration files for multiple platforms. While the license for this code is designed to encourage broad adoption in products, the license terms specifically prohibit including any of Device Porting Kit's code in products or systems that use strong copyleft licensing.[9]
“ | 2. c. Distribution Restrictions. You may not … modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that the code be disclosed or distributed in source code form; or others have the right to modify it. | ” |
As a consequence, any implementation that would be suitable for inclusion in a software package distributed under the GNU General Public License would need to be written from the HD Photo Bitstream Specification (also assuming Microsoft does cover HD Photo under the Open Specification Promise), although the licenses such as the Open Source Initiative-approved BSD license would likely be acceptable.
[edit] See also
[edit] References
- ^ "Microsoft’s HD Photo Technology Is Considered for Standardization by JPEG". http://www.microsoft.com/presspass/press/2007/jul07/07-31JPEGXRPR.mspx. Retrieved on 2007-07-31.
- ^ WG1 PR Chair (2008-07-11). "Press Release of the 45th WG1 Poitiers Meeting". http://www.itscj.ipsj.or.jp/sc29/29w02901.pdf.
- ^ "Windows Media Photo Specification". http://www.microsoft.com/whdc/xps/wmphoto.mspx. Retrieved on 2006-06-29.
- ^ Paint.NET HD Photo plugin
- ^ "FastPictureViewer's format compatibility chart". http://www.fastpictureviewer.com/formats/.
- ^ Xara Xtreme Features
- ^ Stephen Shankland (2007-01-23). "Vista to give HD Photo format more exposure". CNet. http://news.com.com/2100-1045_3-6153730.html. Retrieved on 2007-03-09.
- ^ "Microsoft Open Specification Promise". 2008-09-09. http://www.microsoft.com/interop/osp/default.mspx. Retrieved on 2008-10-03.
- ^ "HD Photo Device Porting Kit 1.0". Microsoft, Inc.. December 21, 2006. http://www.microsoft.com/downloads/details.aspx?FamilyID=285eeffd-d86c-48c3-ab93-3abd5ee7f1ce&displaylang=en. Retrieved on 2007-08-09.
[edit] External links
- Windows Imaging Component, for HD Photo support in Windows XP
- Microsoft's HD Photo plugin for Photoshop under Windows and Mac OS X
- Microsoft shows off JPEG rival, CNET News, 24 May 2006
- Bill Crow's Windows Media Photo Blog, explaining licensing, technical details, and offering codec downloads.
- This Week in Media podcast about HD Photo, featuring Microsoft's HD Photo Program Manager Bill Crow.
- JPEG committee press release on JPEG XR balloting, November 16, 2007
- Comparison of JPEG/JPEG 2000/JPEG XR image compression codecs in terms of PSNR and visual metrics
- comparison WMP – JPEG 2000
|