static WebPMuxError GetImageInfo(const WebPMuxImage* const wpi, int* const x_offset, int* const y_offset, int* const duration, int* const width, int* const height) { const WebPChunk* const image_chunk = wpi->img_; const WebPChunk* const frame_frgm_chunk = wpi->header_; // Get offsets and duration from ANMF/FRGM chunk. const WebPMuxError err = GetFrameFragmentInfo(frame_frgm_chunk, x_offset, y_offset, duration); if (err != WEBP_MUX_OK) return err; // Get width and height from VP8/VP8L chunk. return MuxGetImageInfo(image_chunk, width, height, NULL); }
static WebPMuxError GetImageInfo(const WebPMuxImage* const wpi, int* const x_offset, int* const y_offset, int* const duration, int* const width, int* const height) { const WebPChunk* const frame_frgm_chunk = wpi->header_; WebPMuxError err; assert(wpi != NULL); assert(frame_frgm_chunk != NULL); // Get offsets and duration from ANMF/FRGM chunk. err = GetFrameFragmentInfo(frame_frgm_chunk, x_offset, y_offset, duration); if (err != WEBP_MUX_OK) return err; // Get width and height from VP8/VP8L chunk. if (width != NULL) *width = wpi->width_; if (height != NULL) *height = wpi->height_; return 1; }