2014-04-23 04:30:27 +02:00
|
|
|
// Copyright 2014 Google Inc. All Rights Reserved.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style license
|
|
|
|
// that can be found in the COPYING file in the root of the source
|
|
|
|
// tree. An additional intellectual property rights grant can be found
|
|
|
|
// in the file PATENTS. All contributing project authors may
|
|
|
|
// be found in the AUTHORS file in the root of the source tree.
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// WebP decode.
|
|
|
|
|
2016-07-20 01:02:55 +02:00
|
|
|
#ifndef WEBP_IMAGEIO_WEBPDEC_H_
|
|
|
|
#define WEBP_IMAGEIO_WEBPDEC_H_
|
2014-04-23 04:30:27 +02:00
|
|
|
|
2015-12-08 08:22:41 +01:00
|
|
|
#include "webp/types.h"
|
|
|
|
|
2014-04-23 04:30:27 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct Metadata;
|
|
|
|
struct WebPPicture;
|
|
|
|
|
|
|
|
// Reads a WebP from 'in_file', returning the decoded output in 'pic'.
|
2015-10-27 22:54:11 +01:00
|
|
|
// Output is RGBA or YUVA, depending on pic->use_argb value.
|
2015-10-28 10:04:28 +01:00
|
|
|
// If 'keep_alpha' is true and the WebP has an alpha channel, the output is RGBA
|
2015-10-27 22:54:11 +01:00
|
|
|
// or YUVA. Otherwise, alpha channel is dropped and output is RGB or YUV.
|
2014-04-23 04:30:27 +02:00
|
|
|
// Returns true on success.
|
2015-12-08 08:22:41 +01:00
|
|
|
int ReadWebP(const uint8_t* const data, size_t data_size,
|
|
|
|
struct WebPPicture* const pic,
|
2014-04-23 04:30:27 +02:00
|
|
|
int keep_alpha, struct Metadata* const metadata);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} // extern "C"
|
|
|
|
#endif
|
|
|
|
|
2016-07-20 01:02:55 +02:00
|
|
|
#endif // WEBP_IMAGEIO_WEBPDEC_H_
|