mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
cwebp: add support for stdin input
we map the input file into memory, even in the non-stdin case. This is less efficient than letting the png/jpeg/... decoding libraries use fread()'s, but more general. Change-Id: I4501cb9a1daf69593eb8e3326c115cd8cbdf92fd
This commit is contained in:
@ -22,12 +22,11 @@ extern "C" {
|
||||
struct Metadata;
|
||||
struct WebPPicture;
|
||||
|
||||
// Reads a JPEG from 'filename', returning the decoded output in 'pic'.
|
||||
// If 'filename' is equal '-', input is read from stdin.
|
||||
// Reads a JPEG from 'data', returning the decoded output in 'pic'.
|
||||
// The output is RGB or YUV depending on pic->use_argb value.
|
||||
// Returns true on success.
|
||||
int ReadJPEG(const char* const filename, struct WebPPicture* const pic,
|
||||
struct Metadata* const metadata);
|
||||
int ReadJPEG(const uint8_t* const data, size_t data_size,
|
||||
struct WebPPicture* const pic, struct Metadata* const metadata);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
Reference in New Issue
Block a user