Report whether a WebP input is animated by checking for the ANIMATION_FLAG feature flag.
Changes:
New Functionality: Added a function webp_decoder_get_num_frames in webp.cpp to determine if a WebP file contains animation by checking the WebP feature flags.
Modified Header Parsing: Updated the Header method in webp.go to utilize the new webp_decoder_get_num_frames function, setting the numFrames value based on whether the input WebP image is animated.
Test Cases: Introduced new test cases in lilliput_test.go for both animated and ordinary WebP images to ensure correct detection of the animation feature.
Test Assets: Added big_buck_bunny_720_5s.webp as a test file to validate the detection of animated WebP content.
Report whether a WebP input is animated by checking for the
ANIMATION_FLAG
feature flag.Changes:
webp_decoder_get_num_frames
inwebp.cpp
to determine if a WebP file contains animation by checking the WebP feature flags.webp.go
to utilize the newwebp_decoder_get_num_frames
function, setting thenumFrames
value based on whether the input WebP image is animated.lilliput_test.go
for both animated and ordinary WebP images to ensure correct detection of the animation feature.big_buck_bunny_720_5s.webp
as a test file to validate the detection of animated WebP content.