|
Packit |
9c6abc |
// Copyright 2017 Google Inc. All Rights Reserved.
|
|
Packit |
9c6abc |
//
|
|
Packit |
9c6abc |
// Use of this source code is governed by a BSD-style license
|
|
Packit |
9c6abc |
// that can be found in the COPYING file in the root of the source
|
|
Packit |
9c6abc |
// tree. An additional intellectual property rights grant can be found
|
|
Packit |
9c6abc |
// in the file PATENTS. All contributing project authors may
|
|
Packit |
9c6abc |
// be found in the AUTHORS file in the root of the source tree.
|
|
Packit |
9c6abc |
// -----------------------------------------------------------------------------
|
|
Packit |
9c6abc |
//
|
|
Packit |
9c6abc |
// partial PNM format decoder (ppm/pgm)
|
|
Packit |
9c6abc |
|
|
Packit |
9c6abc |
#ifndef WEBP_IMAGEIO_PNMDEC_H_
|
|
Packit |
9c6abc |
#define WEBP_IMAGEIO_PNMDEC_H_
|
|
Packit |
9c6abc |
|
|
Packit |
9c6abc |
#include "webp/types.h"
|
|
Packit |
9c6abc |
|
|
Packit |
9c6abc |
#ifdef __cplusplus
|
|
Packit |
9c6abc |
extern "C" {
|
|
Packit |
9c6abc |
#endif
|
|
Packit |
9c6abc |
|
|
Packit |
9c6abc |
struct Metadata;
|
|
Packit |
9c6abc |
struct WebPPicture;
|
|
Packit |
9c6abc |
|
|
Packit |
9c6abc |
// Reads a PNM file from 'data', returning the decoded output in 'pic'.
|
|
Packit |
9c6abc |
// The output is RGB or YUV depending on pic->use_argb value.
|
|
Packit |
9c6abc |
// Returns true on success.
|
|
Packit |
9c6abc |
// 'metadata' has no effect, but is kept for coherence with other signatures
|
|
Packit |
9c6abc |
// for image readers.
|
|
Packit |
9c6abc |
int ReadPNM(const uint8_t* const data, size_t data_size,
|
|
Packit |
9c6abc |
struct WebPPicture* const pic, int keep_alpha,
|
|
Packit |
9c6abc |
struct Metadata* const metadata);
|
|
Packit |
9c6abc |
|
|
Packit |
9c6abc |
#ifdef __cplusplus
|
|
Packit |
9c6abc |
} // extern "C"
|
|
Packit |
9c6abc |
#endif
|
|
Packit |
9c6abc |
|
|
Packit |
9c6abc |
#endif // WEBP_IMAGEIO_PNMDEC_H_
|