Wmphoto Website Links For
Photo
 

Information About

Wmphoto




  Extension <tt>hdp ''(formerly wdp)''</tt>
  Mime <tt>image/vndms-photo</tt>
  Owner Microsoft <!--, JPEG-->
  Genre Graphics File Format
  Extendedfrom <!--Windows Media Photo-->
  Extendedto <!--JPEG XR-->


HD Photo ''(formerly '''Windows Media Photo''')'' is a still image compression algorithm and file format for Continuous Tone photographic images, developed 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. While named "HD Photo", there is no formal connection to or association with high-definition multimedia, such as HDTV .


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.


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, an 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.


COMPRESSION ALGORITHM

At a high level, HD Photo's design is very similar to 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

  • ::C_o = B - R\,

::C_g = R - G + \left\lceil rac{C_o}{2} ight ceil
::Y = G + \left\lfloor rac{C_g}{2} ight floor

  • 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 "PCT", 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".


LICENSING


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

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.


SEE ALSO



REFERENCES



EXTERNAL LINKS