mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
libwebp/demux: add WebPDemuxGetI
Enables queries for format flag, canvas width/height. Change-Id: I1d97a633712141e42dfc86c95492eb6da5cefa01
This commit is contained in:
@ -650,6 +650,21 @@ void WebPDemuxDelete(WebPDemuxer* const dmux) {
|
||||
free(dmux);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
uint32_t WebPDemuxGetI(const WebPDemuxer* const dmux,
|
||||
WebPFormatFeature feature) {
|
||||
if (dmux == NULL) return 0;
|
||||
|
||||
switch (feature) {
|
||||
case WEBP_FF_FORMAT_FLAGS: return dmux->feature_flags_;
|
||||
case WEBP_FF_CANVAS_WIDTH: return (uint32_t)dmux->canvas_width_;
|
||||
case WEBP_FF_CANVAS_HEIGHT: return (uint32_t)dmux->canvas_height_;
|
||||
case WEBP_FF_LOOP_COUNT: return (uint32_t)dmux->loop_count_;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user