| 4054 | } |
| 4055 | |
| 4056 | static int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp) |
| 4057 | { |
| 4058 | if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { |
| 4059 | stbi__rewind( j->s ); |
| 4060 | return 0; |
| 4061 | } |
| 4062 | if (x) *x = j->s->img_x; |
| 4063 | if (y) *y = j->s->img_y; |
| 4064 | if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; |
| 4065 | return 1; |
| 4066 | } |
| 4067 | |
| 4068 | static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp) |
| 4069 | { |
no test coverage detected