1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! JPEG marker byte constants (ITU T.81 Annex B).
//!
//! Each marker is a two-byte sequence `0xFF, 0x??`. Only the second byte
//! is declared here. The first byte is always `0xFF`; a run of `0xFF`
//! bytes before the payload byte is legal as fill.
/// Start of Image.
pub const SOI: u8 = 0xD8;
/// End of Image.
pub const EOI: u8 = 0xD9;
/// Start of Scan.
pub const SOS: u8 = 0xDA;
/// Define Quantization Table(s).
pub const DQT: u8 = 0xDB;
/// Define Huffman Table(s).
pub const DHT: u8 = 0xC4;
/// Define Restart Interval.
pub const DRI: u8 = 0xDD;
/// COMment segment.
pub const COM: u8 = 0xFE;
/// Baseline DCT sequential.
pub const SOF0: u8 = 0xC0;
/// Extended sequential DCT (same scan structure as SOF0 for 8-bit).
pub const SOF1: u8 = 0xC1;
/// Progressive DCT.
pub const SOF2: u8 = 0xC2;
/// Lossless sequential (not implemented — uses predictor+Huffman, not DCT).
pub const SOF3: u8 = 0xC3;
/// Application-specific markers APP0..APP15 (0xE0..0xEF).
pub const APP0: u8 = 0xE0;
/// APP14 — conventionally carries the Adobe colour-transform tag.
pub const APP14: u8 = 0xEE;
pub const APP15: u8 = 0xEF;
/// Restart markers RST0..RST7 (0xD0..0xD7).
pub const RST0: u8 = 0xD0;
pub const RST7: u8 = 0xD7;
/// Returns true if `b` is an `APPn` marker byte.
/// Returns true if `b` is a restart (RSTn) marker byte.
/// Returns true if `b` is any SOFn (Start Of Frame) marker.
/// Excludes DHT (0xC4) and JPG (0xC8).