| 4390 | } |
| 4391 | |
| 4392 | static int stbi__jpeg_info_raw(stbi__jpeg* j, int* x, int* y, int* comp) { |
| 4393 | if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { |
| 4394 | stbi__rewind(j->s); |
| 4395 | return 0; |
| 4396 | } |
| 4397 | if (x) |
| 4398 | *x = j->s->img_x; |
| 4399 | if (y) |
| 4400 | *y = j->s->img_y; |
| 4401 | if (comp) |
| 4402 | *comp = j->s->img_n >= 3 ? 3 : 1; |
| 4403 | return 1; |
| 4404 | } |
| 4405 | |
| 4406 | static int stbi__jpeg_info(stbi__context* s, int* x, int* y, int* comp) { |
| 4407 | int result; |
no test coverage detected