Merge "Add GetCanvasSize() method to mux"

This commit is contained in:
pascal massimino
2013-05-08 01:53:22 -07:00
committed by Gerrit Code Review
6 changed files with 69 additions and 4 deletions

View File

@ -177,9 +177,14 @@ static const char* ErrorString(WebPMuxError err) {
} while (0)
static WebPMuxError DisplayInfo(const WebPMux* mux) {
int width, height;
uint32_t flag;
WebPMuxError err = WebPMuxGetFeatures(mux, &flag);
WebPMuxError err = WebPMuxGetCanvasSize(mux, &width, &height);
RETURN_IF_ERROR("Failed to retrieve canvas width/height.\n");
printf("Canvas size: %d x %d\n", width, height);
err = WebPMuxGetFeatures(mux, &flag);
#ifndef WEBP_EXPERIMENTAL_FEATURES
if (flag & FRAGMENTS_FLAG) err = WEBP_MUX_INVALID_ARGUMENT;
#endif