github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/graphics-magick/include/GraphicsMagick/magick/compress.h (about)

     1  /*
     2    Copyright (C) 2003 - 2009 GraphicsMagick Group
     3    Copyright (C) 2002 ImageMagick Studio
     4    Copyright 1991-1999 E. I. du Pont de Nemours and Company
     5  
     6    This program is covered by multiple licenses, which are described in
     7    Copyright.txt. You should have received a copy of Copyright.txt with this
     8    package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
     9  
    10    Image Compression/Decompression Methods.
    11  */
    12  #ifndef _MAGICK_COMPRESS_H
    13  #define _MAGICK_COMPRESS_H
    14  
    15  #if defined(__cplusplus) || defined(c_plusplus)
    16  extern "C" {
    17  #endif
    18  
    19  /*
    20    Typedef declaration.
    21  */
    22  typedef struct _Ascii85Info
    23  {
    24    long
    25      offset,
    26      line_break;
    27  
    28    magick_uint8_t
    29      buffer[10];
    30  } Ascii85Info;
    31  
    32  /*
    33    TODO: Clean up the interface between BLOB write functions,
    34    compression functions, and encoding functions so they
    35    may be hooked into/stacked on top of each other. Most are
    36    (or can be changed to be) stream based.
    37  */
    38  typedef unsigned int
    39    (*WriteByteHook)(Image *, const magick_uint8_t, void *info);
    40  
    41  /*
    42    Commonly used byte writer hooks.
    43  */
    44  extern MagickExport unsigned int
    45    Ascii85WriteByteHook(Image *image, const magick_uint8_t code, void *info),
    46    BlobWriteByteHook(Image *image, const magick_uint8_t code, void *info);
    47  
    48  /*
    49    Compress methods.
    50  */
    51  extern MagickExport MagickPassFail
    52    HuffmanDecodeImage(Image *image),
    53    HuffmanEncodeImage(const ImageInfo *image_info,Image *image),
    54    HuffmanEncode2Image(const ImageInfo *image_info,Image *image,WriteByteHook write_byte,void *info),
    55    LZWEncodeImage(Image *image,const size_t length,magick_uint8_t *pixels),
    56    LZWEncode2Image(Image *image,const size_t length,magick_uint8_t *pixels,WriteByteHook write_byte,void *info),
    57    PackbitsEncodeImage(Image *image,const size_t length,magick_uint8_t *pixels),
    58    PackbitsEncode2Image(Image *image,const size_t length,magick_uint8_t *pixels,WriteByteHook write_byte,void *info);
    59  
    60  extern MagickExport unsigned char
    61    *ImageToHuffman2DBlob(const Image *image,const ImageInfo *image_info,
    62       size_t *length,ExceptionInfo *exception),
    63    *ImageToJPEGBlob(const Image *image,const ImageInfo *image_info,
    64       size_t *length,ExceptionInfo *exception);
    65  
    66  extern MagickExport void
    67    Ascii85Encode(Image *image,const magick_uint8_t code),
    68    Ascii85Flush(Image *image),
    69    Ascii85Initialize(Image *image);
    70  
    71  #if defined(__cplusplus) || defined(c_plusplus)
    72  }
    73  #endif
    74  
    75  #endif
    76  
    77  /*
    78   * Local Variables:
    79   * mode: c
    80   * c-basic-offset: 2
    81   * fill-column: 78
    82   * End:
    83   */