Source for gnu.javax.imageio.jpeg.JPEGMarker

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