| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
#ifndef WEBP_IMAGEIO_IMAGE_ENC_H_ |
| 15 |
#define WEBP_IMAGEIO_IMAGE_ENC_H_ |
| 16 |
|
| 17 |
#include <stdio.h> |
| 18 |
|
| 19 |
#ifdef HAVE_CONFIG_H |
| 20 |
#include "webp/config.h" |
| 21 |
#endif |
| 22 |
|
| 23 |
#include "webp/types.h" |
| 24 |
#include "webp/decode.h" |
| 25 |
|
| 26 |
#ifdef __cplusplus |
| 27 |
extern "C" { |
| 28 |
#endif |
| 29 |
|
| 30 |
|
| 31 |
typedef enum { |
| 32 |
PNG = 0, |
| 33 |
PAM, |
| 34 |
PPM, |
| 35 |
PGM, |
| 36 |
BMP, |
| 37 |
TIFF, |
| 38 |
RAW_YUV, |
| 39 |
ALPHA_PLANE_ONLY, |
| 40 |
|
| 41 |
RGB, RGBA, BGR, BGRA, ARGB, |
| 42 |
RGBA_4444, RGB_565, |
| 43 |
rgbA, bgrA, Argb, rgbA_4444, |
| 44 |
YUV, YUVA |
| 45 |
} WebPOutputFileFormat; |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
int WebPSaveImage(const WebPDecBuffer* const buffer, |
| 53 |
WebPOutputFileFormat format, const char* const out_file_name); |
| 54 |
|
| 55 |
|
| 56 |
#ifdef HAVE_WINCODEC_H |
| 57 |
int WebPWritePNG(const char* out_file_name, int use_stdout, |
| 58 |
const struct WebPDecBuffer* const buffer); |
| 59 |
#else |
| 60 |
int WebPWritePNG(FILE* out_file, const WebPDecBuffer* const buffer); |
| 61 |
#endif |
| 62 |
|
| 63 |
|
| 64 |
int WebPWritePPM(FILE* fout, const struct WebPDecBuffer* const buffer); |
| 65 |
|
| 66 |
|
| 67 |
int WebPWritePAM(FILE* fout, const struct WebPDecBuffer* const buffer); |
| 68 |
|
| 69 |
|
| 70 |
int WebPWrite16bAsPGM(FILE* fout, const struct WebPDecBuffer* const buffer); |
| 71 |
|
| 72 |
|
| 73 |
int WebPWriteBMP(FILE* fout, const struct WebPDecBuffer* const buffer); |
| 74 |
|
| 75 |
|
| 76 |
int WebPWriteTIFF(FILE* fout, const struct WebPDecBuffer* const buffer); |
| 77 |
|
| 78 |
|
| 79 |
int WebPWriteAlphaPlane(FILE* fout, const struct WebPDecBuffer* const buffer); |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
int WebPWritePGM(FILE* fout, const struct WebPDecBuffer* const buffer); |
| 85 |
|
| 86 |
|
| 87 |
int WebPWriteYUV(FILE* fout, const struct WebPDecBuffer* const buffer); |
| 88 |
|
| 89 |
|
| 90 |
int WebPWrite16bAsPGM(FILE* fout, const struct WebPDecBuffer* const buffer); |
| 91 |
|
| 92 |
#ifdef __cplusplus |
| 93 |
} |
| 94 |
#endif |
| 95 |
|
| 96 |
#endif |