JPEGMarker.java 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. /* JPEGMarker.java --
  2. Copyright (C) 2006 Free Software Foundation, Inc.
  3. This file is part of GNU Classpath.
  4. GNU Classpath is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.
  8. GNU Classpath is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GNU Classpath; see the file COPYING. If not, write to the
  14. Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. 02110-1301 USA.
  16. Linking this library statically or dynamically with other modules is
  17. making a combined work based on this library. Thus, the terms and
  18. conditions of the GNU General Public License cover the whole
  19. combination.
  20. As a special exception, the copyright holders of this library give you
  21. permission to link this library with independent modules to produce an
  22. executable, regardless of the license terms of these independent
  23. modules, and to copy and distribute the resulting executable under
  24. terms of your choice, provided that you also meet, for each linked
  25. independent module, the terms and conditions of the license of that
  26. module. An independent module is a module which is not derived from
  27. or based on this library. If you modify this library, you may extend
  28. this exception to your version of the library, but you are not
  29. obligated to do so. If you do not wish to do so, delete this
  30. exception statement from your version. */
  31. package gnu.javax.imageio.jpeg;
  32. public class JPEGMarker
  33. {
  34. /**
  35. * JFIF identifiers.
  36. */
  37. public final static byte JFIF_J = (byte) 0x4a;
  38. public final static byte JFIF_F = (byte) 0x46;
  39. public final static byte JFIF_I = (byte) 0x49;
  40. public final static byte JFIF_X = (byte) 0x46;
  41. /**
  42. * JFIF extension codes.
  43. */
  44. public final static byte JFXX_JPEG = (byte) 0x10;
  45. public final static byte JFXX_ONE_BPP = (byte) 0x11;
  46. public final static byte JFXX_THREE_BPP = (byte) 0x13;
  47. /**
  48. * Marker prefix byte.
  49. */
  50. public final static byte XFF = (byte) 0xff;
  51. /**
  52. * Marker byte that represents a literal 0xff.
  53. */
  54. public final static byte X00 = (byte) 0x00;
  55. /**
  56. * Application Reserved Keyword.
  57. */
  58. public final static byte APP0 = (byte) 0xe0;
  59. public final static byte APP1 = (byte) 0xe1;
  60. public final static byte APP2 = (byte) 0xe2;
  61. public final static byte APP3 = (byte) 0xe3;
  62. public final static byte APP4 = (byte) 0xe4;
  63. public final static byte APP5 = (byte) 0xe5;
  64. public final static byte APP6 = (byte) 0xe6;
  65. public final static byte APP7 = (byte) 0xe7;
  66. public final static byte APP8 = (byte) 0xe8;
  67. public final static byte APP9 = (byte) 0xe9;
  68. public final static byte APP10 = (byte) 0xea;
  69. public final static byte APP11 = (byte) 0xeb;
  70. public final static byte APP12 = (byte) 0xec;
  71. public final static byte APP13 = (byte) 0xed;
  72. public final static byte APP14 = (byte) 0xee;
  73. public final static byte APP15 = (byte) 0xef;
  74. /**
  75. * Modulo Restart Interval.
  76. */
  77. public final static byte RST0 = (byte) 0xd0;
  78. public final static byte RST1 = (byte) 0xd1;
  79. public final static byte RST2 = (byte) 0xd2;
  80. public final static byte RST3 = (byte) 0xd3;
  81. public final static byte RST4 = (byte) 0xd4;
  82. public final static byte RST5 = (byte) 0xd5;
  83. public final static byte RST6 = (byte) 0xd6;
  84. public final static byte RST7 = (byte) 0xd7;
  85. /**
  86. * Nondifferential Huffman-coding frame (baseline dct).
  87. */
  88. public final static byte SOF0 = (byte) 0xc0;
  89. /**
  90. * Nondifferential Huffman-coding frame (extended dct).
  91. */
  92. public final static byte SOF1 = (byte) 0xc1;
  93. /**
  94. * Nondifferential Huffman-coding frame (progressive dct).
  95. */
  96. public final static byte SOF2 = (byte) 0xc2;
  97. /**
  98. * Nondifferential Huffman-coding frame Lossless (Sequential).
  99. */
  100. public final static byte SOF3 = (byte) 0xc3;
  101. /**
  102. * Differential Huffman-coding frame Sequential DCT.
  103. */
  104. public final static byte SOF5 = (byte) 0xc5;
  105. /**
  106. * Differential Huffman-coding frame Progressive DCT.
  107. */
  108. public final static byte SOF6 = (byte) 0xc6;
  109. /**
  110. * Differential Huffman-coding frame lossless.
  111. */
  112. public final static byte SOF7 = (byte) 0xc7;
  113. /**
  114. * Nondifferential Arithmetic-coding frame (extended dct).
  115. */
  116. public final static byte SOF9 = (byte) 0xc9;
  117. /**
  118. * Nondifferential Arithmetic-coding frame (progressive dct).
  119. */
  120. public final static byte SOF10 = (byte) 0xca;
  121. /**
  122. * Nondifferential Arithmetic-coding frame (lossless).
  123. */
  124. public final static byte SOF11 = (byte) 0xcb;
  125. /**
  126. * Differential Arithmetic-coding frame (sequential dct).
  127. */
  128. public final static byte SOF13 = (byte) 0xcd;
  129. /**
  130. * Differential Arithmetic-coding frame (progressive dct).
  131. */
  132. public final static byte SOF14 = (byte) 0xce;
  133. /**
  134. * Differential Arithmetic-coding frame (lossless).
  135. */
  136. public final static byte SOF15 = (byte) 0xcf;
  137. /**
  138. * Huffman Table.
  139. */
  140. public final static byte DHT = (byte) 0xc4;
  141. /**
  142. * Quantization Table.
  143. */
  144. public final static byte DQT = (byte) 0xdb;
  145. /**
  146. * Start of Scan.
  147. */
  148. public final static byte SOS = (byte) 0xda;
  149. /**
  150. * Defined Restart Interval.
  151. */
  152. public final static byte DRI = (byte) 0xdd;
  153. /**
  154. * Comment in JPEG.
  155. */
  156. public final static byte COM = (byte) 0xfe;
  157. /**
  158. * Start of Image.
  159. */
  160. public final static byte SOI = (byte) 0xd8;
  161. /**
  162. * End of Image.
  163. */
  164. public final static byte EOI = (byte) 0xd9;
  165. /**
  166. * Define Number of Lines.
  167. */
  168. public final static byte DNL = (byte) 0xdc;
  169. }