mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
Introduce a generic WebPGetImageReader(type) function
Also introduce an always-failing 'reader' for unknown formats. So we don't have to check reader==NULL, code is more regular. -> We can get read of specific ReadPNG(), ReadJPEG(), ... declaration and use. Change-Id: I290759705420878f00c7223c726d4ad404afd9c4
This commit is contained in:
committed by
James Zern
parent
4eb5df28d1
commit
ce8733209d
@ -49,8 +49,12 @@ typedef int (*WebPImageReader)(const uint8_t* const data, size_t data_size,
|
||||
struct WebPPicture* const pic,
|
||||
int keep_alpha, struct Metadata* const metadata);
|
||||
|
||||
// Return the reader associated to a given file format.
|
||||
WebPImageReader WebPGetImageReader(WebPInputFileFormat format);
|
||||
|
||||
// This function is similar to WebPGuessImageType(), but returns a
|
||||
// suitable reader function. Or NULL if the image can't be guessed.
|
||||
// suitable reader function. The returned reader is never NULL, but
|
||||
// unknown formats will return an always-failing valid reader.
|
||||
WebPImageReader WebPGuessImageReader(const uint8_t* const data,
|
||||
size_t data_size);
|
||||
|
||||
|
Reference in New Issue
Block a user