github.com/cellofellow/gopkg@v0.0.0-20140722061823-eec0544a62ad/image/webp/libwebp/include/webp.h (about)

     1  // Copyright 2014 <chaishushan{AT}gmail.com>. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  #ifndef WEBP_H_
     6  #define WEBP_H_
     7  
     8  #include <stdint.h>
     9  
    10  #ifdef __cplusplus
    11  extern "C" {
    12  #endif
    13  
    14  int webpGetInfo(
    15  	const uint8_t* data, size_t data_size,
    16  	int* width, int* height,
    17  	int* has_alpha
    18  );
    19  
    20  uint8_t* webpDecodeGray(
    21  	const uint8_t* data, size_t data_size,
    22  	int* width, int* height
    23  );
    24  uint8_t* webpDecodeRGB(
    25  	const uint8_t* data, size_t data_size,
    26  	int* width, int* height
    27  );
    28  uint8_t* webpDecodeRGBA(
    29  	const uint8_t* data, size_t data_size,
    30  	int* width, int* height
    31  );
    32  
    33  size_t webpEncodeGray(
    34  	const uint8_t* gray, int width, int height, int stride, float quality_factor,
    35  	uint8_t** output
    36  );
    37  size_t webpEncodeRGB(
    38  	const uint8_t* rgb, int width, int height, int stride, float quality_factor,
    39  	uint8_t** output
    40  );
    41  size_t webpEncodeRGBA(
    42  	const uint8_t* rgba, int width, int height, int stride, float quality_factor,
    43  	uint8_t** output
    44  );
    45  
    46  size_t webpEncodeLosslessGray(
    47  	const uint8_t* gray, int width, int height, int stride,
    48  	uint8_t** output
    49  );
    50  size_t webpEncodeLosslessRGB(
    51  	const uint8_t* rgb, int width, int height, int stride,
    52  	uint8_t** output
    53  );
    54  size_t webpEncodeLosslessRGBA(
    55  	const uint8_t* rgba, int width, int height, int stride,
    56  	uint8_t** output
    57  );
    58  
    59  void webpFree(void* p);
    60  
    61  #ifdef __cplusplus
    62  }
    63  #endif
    64  #endif // WEBP_H_