Add a fuzzer for ReadAnimatedImage

Bug: 496629074
Change-Id: Ie984f0eab67e8e6eda44abeedf9c13aa213dd340
This commit is contained in:
Vincent Rabaud
2026-03-27 14:49:51 +01:00
parent a7441f5630
commit b8814a57f0
6 changed files with 141 additions and 13 deletions

View File

@@ -52,6 +52,13 @@ void ClearAnimatedImage(AnimatedImage* const image);
int ReadAnimatedImage(const char filename[], AnimatedImage* const image,
int dump_frames, const char dump_folder[]);
// Same as 'ReadAnimatedImage', but from a memory buffer.
// filename is only used for log messages.
int ReadAnimatedImageFromMemory(const char filename[],
const uint8_t* const data, size_t size,
AnimatedImage* const image, int dump_frames,
const char dump_folder[]);
// Given two RGBA buffers, calculate max pixel difference and PSNR.
// If 'premultiply' is true, R/G/B values will be pre-multiplied by the
// transparency before comparison.