mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
make ReadPNG and ReadJPEG take a filename instead of a FILE
-> read is a bit slower (memory allocation and such) than reading directly from disk. -> we're not yet ready to accept stdin as input (-- -) because we still need to guess the file type with GetImageType(). And since we can't rewind on stdin, this will need a bit more work before being able to read from stdin. Change-Id: I6491fac4b07d28d1854518325ead88669656ddbf
This commit is contained in:
@ -22,10 +22,11 @@ extern "C" {
|
||||
struct Metadata;
|
||||
struct WebPPicture;
|
||||
|
||||
// Reads a JPEG from 'in_file', returning the decoded output in 'pic'.
|
||||
// Reads a JPEG from 'filename', returning the decoded output in 'pic'.
|
||||
// If 'filename' is equal '-', input is read from stdin.
|
||||
// The output is RGB or YUV depending on pic->use_argb value.
|
||||
// Returns true on success.
|
||||
int ReadJPEG(FILE* in_file, struct WebPPicture* const pic,
|
||||
int ReadJPEG(const char* const filename, struct WebPPicture* const pic,
|
||||
struct Metadata* const metadata);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user