|
67 | 67 | #define SOF14 0xce
|
68 | 68 | #define SOF15 0xcf
|
69 | 69 |
|
70 |
| -/* Start of tag markers */ |
71 |
| -#define APP14 0xee /* Adobe */ |
72 |
| - |
73 | 70 | static const unsigned char *
|
74 | 71 | _jpeg_skip_segment (const unsigned char *p)
|
75 | 72 | {
|
@@ -97,8 +94,6 @@ _cairo_image_info_get_jpeg_info (cairo_image_info_t *info,
|
97 | 94 | {
|
98 | 95 | const unsigned char *p = data;
|
99 | 96 |
|
100 |
| - info->is_adobe_jpeg = FALSE; |
101 |
| - |
102 | 97 | while (p + 1 < data + length) {
|
103 | 98 | if (*p != 0xff)
|
104 | 99 | return CAIRO_INT_STATUS_UNSUPPORTED;
|
@@ -136,18 +131,6 @@ _cairo_image_info_get_jpeg_info (cairo_image_info_t *info,
|
136 | 131 | _jpeg_extract_info (info, p);
|
137 | 132 | return CAIRO_STATUS_SUCCESS;
|
138 | 133 |
|
139 |
| - case APP14: |
140 |
| - /* "Adobe" tags segment indicates inverted CMYK (in |
141 |
| - * CMYK images). */ |
142 |
| - if (p + 12 > data + length) |
143 |
| - return CAIRO_INT_STATUS_UNSUPPORTED; |
144 |
| - |
145 |
| - info->is_adobe_jpeg = |
146 |
| - (0 == strncmp((const char *)(p + 3), "Adobe", 5)); |
147 |
| - |
148 |
| - p = _jpeg_skip_segment(p); |
149 |
| - break; |
150 |
| - |
151 | 134 | default:
|
152 | 135 | if (*p >= RST_begin && *p <= RST_end) {
|
153 | 136 | p++;
|
@@ -223,7 +206,6 @@ _jpx_extract_info (const unsigned char *p, cairo_image_info_t *info)
|
223 | 206 | info->width = get_unaligned_be32 (p + 4);
|
224 | 207 | info->num_components = (p[8] << 8) + p[9];
|
225 | 208 | info->bits_per_component = p[10];
|
226 |
| - info->is_adobe_jpeg = FALSE; |
227 | 209 | }
|
228 | 210 |
|
229 | 211 | cairo_int_status_t
|
@@ -301,8 +283,6 @@ _cairo_image_info_get_png_info (cairo_image_info_t *info,
|
301 | 283 | p += 4;
|
302 | 284 | info->height = get_unaligned_be32 (p);
|
303 | 285 |
|
304 |
| - info->is_adobe_jpeg = FALSE; |
305 |
| - |
306 | 286 | return CAIRO_STATUS_SUCCESS;
|
307 | 287 | }
|
308 | 288 |
|
@@ -415,7 +395,6 @@ _jbig2_extract_info (cairo_image_info_t *info, const unsigned char *p)
|
415 | 395 | info->height = get_unaligned_be32 (p + 4);
|
416 | 396 | info->num_components = 1;
|
417 | 397 | info->bits_per_component = 1;
|
418 |
| - info->is_adobe_jpeg = FALSE; |
419 | 398 | }
|
420 | 399 |
|
421 | 400 | cairo_int_status_t
|
|
0 commit comments