Home | History | Annotate | Download | only in webp
      1 // Copyright 2015 Google Inc. All Rights Reserved.
      2 //
      3 // Use of this source code is governed by a BSD-style license
      4 // that can be found in the COPYING file in the root of the source
      5 // tree. An additional intellectual property rights grant can be found
      6 // in the file PATENTS. All contributing project authors may
      7 // be found in the AUTHORS file in the root of the source tree.
      8 // -----------------------------------------------------------------------------
      9 //
     10 
     11 #ifndef WEBP_WEBP_EXTRAS_H_
     12 #define WEBP_WEBP_EXTRAS_H_
     13 
     14 #include "./types.h"
     15 
     16 #ifdef __cplusplus
     17 extern "C" {
     18 #endif
     19 
     20 #include "./encode.h"
     21 
     22 #define WEBP_EXTRAS_ABI_VERSION 0x0000    // MAJOR(8b) + MINOR(8b)
     23 
     24 //------------------------------------------------------------------------------
     25 
     26 // Returns the version number of the extras library, packed in hexadecimal using
     27 // 8bits for each of major/minor/revision. E.g: v2.5.7 is 0x020507.
     28 WEBP_EXTERN(int) WebPGetExtrasVersion(void);
     29 
     30 //------------------------------------------------------------------------------
     31 // Ad-hoc colorspace importers.
     32 
     33 // Import luma sample (gray scale image) into 'picture'. The 'picture'
     34 // width and height must be set prior to calling this function.
     35 WEBP_EXTERN(int) WebPImportGray(const uint8_t* gray, WebPPicture* picture);
     36 
     37 // Import rgb sample in RGB565 packed format into 'picture'. The 'picture'
     38 // width and height must be set prior to calling this function.
     39 WEBP_EXTERN(int) WebPImportRGB565(const uint8_t* rgb565, WebPPicture* pic);
     40 
     41 // Import rgb sample in RGB4444 packed format into 'picture'. The 'picture'
     42 // width and height must be set prior to calling this function.
     43 WEBP_EXTERN(int) WebPImportRGB4444(const uint8_t* rgb4444, WebPPicture* pic);
     44 
     45 //------------------------------------------------------------------------------
     46 
     47 #ifdef __cplusplus
     48 }    // extern "C"
     49 #endif
     50 
     51 #endif  /* WEBP_WEBP_EXTRAS_H_ */
     52