| line |
true |
false |
branch |
|
64
|
0 |
0 |
if (r->pos >= r->len) return 0; |
|
75
|
0 |
0 |
if (r->pos + n > r->len) return -1; |
|
89
|
0 |
0 |
if (jpeg_read_byte(r) != 0xFF || jpeg_read_byte(r) != JPEG_MARKER_SOI) { |
|
|
0 |
0 |
if (jpeg_read_byte(r) != 0xFF || jpeg_read_byte(r) != JPEG_MARKER_SOI) { |
|
93
|
0 |
0 |
while (r->pos < r->len) { |
|
98
|
0 |
0 |
if (jpeg_read_byte(r) != 0xFF) { |
|
104
|
0 |
0 |
} while (marker == 0xFF && r->pos < r->len); |
|
|
0 |
0 |
} while (marker == 0xFF && r->pos < r->len); |
|
106
|
0 |
0 |
if (marker == JPEG_MARKER_EOI) { |
|
111
|
0 |
0 |
if (marker == 0 || marker == JPEG_MARKER_SOI || |
|
|
0 |
0 |
if (marker == 0 || marker == JPEG_MARKER_SOI || |
|
|
0 |
0 |
if (marker == 0 || marker == JPEG_MARKER_SOI || |
|
112
|
0 |
0 |
(marker >= 0xD0 && marker <= 0xD7)) { |
|
118
|
0 |
0 |
if (seg_len < 2) return -1; |
|
125
|
0 |
0 |
if (seg_len < 6) return -1; |
|
137
|
0 |
0 |
if (seg_len >= 12) { |
|
140
|
0 |
0 |
for (i = 0; i < 5; i++) { |
|
143
|
0 |
0 |
if (memcmp(sig, "Adobe", 5) == 0) { |
|
167
|
0 |
0 |
return (r->width > 0 && r->height > 0) ? 0 : -1; |
|
|
0 |
0 |
return (r->width > 0 && r->height > 0) ? 0 : -1; |
|
185
|
0 |
0 |
if (!data || !pixels_out || !width || !height || !components) { |
|
|
0 |
0 |
if (!data || !pixels_out || !width || !height || !components) { |
|
|
0 |
0 |
if (!data || !pixels_out || !width || !height || !components) { |
|
|
0 |
0 |
if (!data || !pixels_out || !width || !height || !components) { |
|
|
0 |
0 |
if (!data || !pixels_out || !width || !height || !components) { |
|
217
|
0 |
0 |
if (jpeg_parse_header(&reader) != 0) { |
|
246
|
0 |
0 |
if (!data || !out) return PDFMAKE_IMGR_ERR_NULL; |
|
|
0 |
0 |
if (!data || !out) return PDFMAKE_IMGR_ERR_NULL; |
|
251
|
0 |
0 |
if (err != PDFMAKE_IMGR_OK) { |
|
257
|
0 |
0 |
if (!img) { |
|
287
|
0 |
0 |
if (arena) { |
|
289
|
0 |
0 |
if (!arena_pixels) { |
|
326
|
0 |
0 |
if (!data || len < 2) return 0; |
|
|
0 |
0 |
if (!data || len < 2) return 0; |
|
327
|
0 |
0 |
return (data[0] == 0xFF && data[1] == 0xD8); |
|
|
0 |
0 |
return (data[0] == 0xFF && data[1] == 0xD8); |
|
341
|
0 |
0 |
if (!data || !width || !height) return -1; |
|
|
0 |
0 |
if (!data || !width || !height) return -1; |
|
|
0 |
0 |
if (!data || !width || !height) return -1; |
|
362
|
0 |
0 |
if (jpeg_parse_header(&reader) != 0) { |
|
367
|
0 |
0 |
if (components) *components = reader.components; |
|
395
|
0 |
0 |
if (err != PDFMAKE_IMGR_OK) return err; |
|
400
|
0 |
0 |
if (img->colorspace == PDFMAKE_RCS_CMYK && img->pixels) { |
|
|
0 |
0 |
if (img->colorspace == PDFMAKE_RCS_CMYK && img->pixels) { |
|
402
|
0 |
0 |
for (i = 0; i < img->pixels_len; i++) { |