| 526 | } |
| 527 | |
| 528 | int WebPGetInfo(const uint8_t* data, size_t data_size, int* width, int* height) { |
| 529 | WebPBitstreamFeatures features = {}; |
| 530 | |
| 531 | if (data == nullptr) { |
| 532 | return 0; |
| 533 | } |
| 534 | |
| 535 | if (GetFeatures(data, data_size, &features) != VP8_STATUS_OK) { |
| 536 | return 0; |
| 537 | } |
| 538 | |
| 539 | if (width != nullptr) { |
| 540 | *width = features.width; |
| 541 | } |
| 542 | if (height != nullptr) { |
| 543 | *height = features.height; |
| 544 | } |
| 545 | |
| 546 | return 1; |
| 547 | } |
| 548 | } // namespace pag |
no test coverage detected