quantization-table.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE quantization-tables [
  3. <!ELEMENT quantization-tables (table)>
  4. <!ATTLIST quantization-tables xmlns CDATA #FIXED "">
  5. <!ELEMENT table (description , levels)>
  6. <!ATTLIST table xmlns CDATA #FIXED "">
  7. <!ATTLIST table alias NMTOKEN #REQUIRED>
  8. <!ATTLIST table slot CDATA #REQUIRED>
  9. <!ELEMENT description (#PCDATA)>
  10. <!ATTLIST description xmlns CDATA #FIXED "">
  11. <!ELEMENT levels (#PCDATA)>
  12. <!ATTLIST levels xmlns CDATA #FIXED "">
  13. <!ATTLIST levels divisor CDATA #REQUIRED>
  14. <!ATTLIST levels height CDATA #REQUIRED>
  15. <!ATTLIST levels width CDATA #REQUIRED>
  16. ]>
  17. <!--
  18. JPEG quantization table created by Dr. Nicolas Robidoux, Senior Research
  19. Scientist at Phase One (www.phaseone.com) for use with 2x2 Chroma
  20. subsampling and (IJG-style, hence ImageMagick-style) quality level
  21. around 75.
  22. It is based on the one recommended in
  23. Relevance of human vision to JPEG-DCT compression by Stanley A. Klein,
  24. Amnon D. Silverstein and Thom Carney. In Human Vision, Visual
  25. Processing and Digital Display III, 1992.
  26. for 1 minute per pixel viewing.
  27. Specifying only one table in this xml file has two effects when used with
  28. the ImageMagick option
  29. -define jpeg:q-table=PATH/TO/THIS/FILE
  30. 1) This quantization table is automatically used for all three channels;
  31. 2) Only one copy is embedded in the JPG file, which saves a few bits
  32. (only worthwhile for very small thumbnails).
  33. -->
  34. <quantization-tables>
  35. <table slot="0" alias="luma">
  36. <description>Luma Quantization Table</description>
  37. <levels width="8" height="8" divisor="1">
  38. 16, 16, 16, 18, 25, 37, 56, 85,
  39. 16, 17, 20, 27, 34, 40, 53, 75,
  40. 16, 20, 24, 31, 43, 62, 91, 135,
  41. 18, 27, 31, 40, 53, 74, 106, 156,
  42. 25, 34, 43, 53, 69, 94, 131, 189,
  43. 37, 40, 62, 74, 94, 124, 169, 238,
  44. 56, 53, 91, 106, 131, 169, 226, 311,
  45. 85, 75, 135, 156, 189, 238, 311, 418
  46. </levels>
  47. </table>
  48. <!--
  49. If you want to use a different quantization table for Chroma, for example,
  50. just add:
  51. <table slot="1" alias="chroma">
  52. <description>Chroma Quantization Table</description>
  53. INSERT 64 POSITIVE INTEGERS HERE, COMMA-SEPARATED
  54. </levels>
  55. </table>
  56. here (but outside of these comments).
  57. -->
  58. </quantization-tables>