MCPcopy Create free account
hub / github.com/Tencent/libpag / WebPGetInfo

Function WebPGetInfo

src/codec/utils/WebpDecoder.cpp:528–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526}
527
528int 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

Callers 4

ReadImageBytesFunction · 0.85
ReadImageBytesV2Function · 0.85
WriteImagesFunction · 0.85
isEmptyBitmapFrameMethod · 0.85

Calls 1

GetFeaturesFunction · 0.85

Tested by

no test coverage detected