Windows Media Photo 規格
早上去面試兩位應試者的空檔,我開始讀 Microsoft 最新的 [
Windows Media Photo Specification],手頭拿到的文件版本號為 1.0 final draft,我已經 [
轉成 PDF 格式]。這份文件規範 Windows Media Photo 的 image data encoding、container layout、tag / header information,當然還有 Microsoft Windows 上的 API。
文件的副標題很有意思:"Photographic Still Image File Format",開發演算法與 image codec 的團隊來自 Microsoft VC-9 team,過去 Windows Media Video codec 設計與實做的經驗對 Windows Media Photo (WMP) 有很大的影響。就同等的視覺品質來說,JPEG 大約達 12:1 的壓縮率,而 WMP 則可到達 25:1,同時,在 codec kernel 的設計來說,其採用對稱性的演算法,容許使用 lossless 與 lossy 的壓縮途徑,就這點來說,WMP 有著跟 JPEG-2000 的高水準,而據 Microsoft 的文獻指出,計算複雜度與記憶體需求卻只有跟 JPEG 相似的要求,這實在令人驚艷!
以下節錄文件中的幾個重點:
- Windows Media Photo offers image quality comparable to JPEG-2000 with computational and memory performance more closely comparable to JPEG. Windows Media Photo delivers a lossy compressed image of better perceptive quality than JPEG at less than half the file size. The same
compression algorithm can also deliver mathematically lossless compressed images that are typically 2.5 times smaller than the original uncompressed data.
- The core compression transform requires at most 3 non-trivial (multiply plus addition) and 7 trivial (addition or shift) operations per pixel (with no divisions) at the highest quality level. In the highest performance mode, only 1 non-trivial and 4 trivial operations per pixel are required. The image is processed in 16x16 macro blocks, allowing a minimal memory footprint for embedded implementations.
- Windows Media Photo provides native support for both RGB and CMYK, providing a reversible color transform for each of these color formats to an internal luminance-dominant format used for optimal compression efficiency. In addition Windows Media Photo supports monochrome and arbitrary n-channel color formats.
- The formats supported by Windows Media Photo are divided into Basic and Advanced formats. The minimum requirements for a decoder for digital photography applications include support for the Basic formats. The Advanced formats can optionally be supported by decoders targeted for other application-specific scenarios including printing, 3D rendering or advanced imagery applications. An encoder need only support the specific formats required for its particular scenarios.
- Windows Media Photo stores image data in a container organized as a table of Image File Directory (IFD) tags, similar to a TIFF 6.0 container.
- Rather than use a series of metadata tags to attempt describe the attributes of an image's structure, Windows Media Photo uses a unique GUID to provide a non-ambiguous definition of the image pixel format.
後面的 WIC (Windows Image Codec/Component) API 則可作為一個編碼壓縮流程的參考。
由 jserv 發表於 May 27, 2006 01:39 PM