forked from google/knusperli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjpeg_error.h
71 lines (65 loc) · 1.89 KB
/
jpeg_error.h
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
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Definition of error codes for parsing jpeg files.
#ifndef KNUSPERLI_JPEG_ERROR_H_
#define KNUSPERLI_JPEG_ERROR_H_
namespace knusperli {
enum JPEGReadError {
JPEG_OK = 0,
JPEG_SOI_NOT_FOUND,
JPEG_SOF_NOT_FOUND,
JPEG_UNEXPECTED_EOF,
JPEG_MARKER_BYTE_NOT_FOUND,
JPEG_UNSUPPORTED_MARKER,
JPEG_WRONG_MARKER_SIZE,
JPEG_INVALID_PRECISION,
JPEG_INVALID_WIDTH,
JPEG_INVALID_HEIGHT,
JPEG_INVALID_NUMCOMP,
JPEG_INVALID_SAMP_FACTOR,
JPEG_INVALID_START_OF_SCAN,
JPEG_INVALID_END_OF_SCAN,
JPEG_INVALID_SCAN_BIT_POSITION,
JPEG_INVALID_COMPS_IN_SCAN,
JPEG_INVALID_HUFFMAN_INDEX,
JPEG_INVALID_QUANT_TBL_INDEX,
JPEG_INVALID_QUANT_VAL,
JPEG_INVALID_MARKER_LEN,
JPEG_INVALID_SAMPLING_FACTORS,
JPEG_INVALID_HUFFMAN_CODE,
JPEG_INVALID_SYMBOL,
JPEG_NON_REPRESENTABLE_DC_COEFF,
JPEG_NON_REPRESENTABLE_AC_COEFF,
JPEG_INVALID_SCAN,
JPEG_OVERLAPPING_SCANS,
JPEG_INVALID_SCAN_ORDER,
JPEG_EXTRA_ZERO_RUN,
JPEG_DUPLICATE_DRI,
JPEG_DUPLICATE_SOF,
JPEG_WRONG_RESTART_MARKER,
JPEG_DUPLICATE_COMPONENT_ID,
JPEG_COMPONENT_NOT_FOUND,
JPEG_HUFFMAN_TABLE_NOT_FOUND,
JPEG_HUFFMAN_TABLE_ERROR,
JPEG_QUANT_TABLE_NOT_FOUND,
JPEG_EMPTY_DHT,
JPEG_EMPTY_DQT,
JPEG_OUT_OF_BAND_COEFF,
JPEG_EOB_RUN_TOO_LONG,
JPEG_IMAGE_TOO_LARGE,
};
} // namespace knusperli
#endif // KNUSPERLI_JPEG_ERROR_H_