"Fossies" - the Fresh Open Source Software Archive

Member "littleutils-1.2.5/imageutils/libpngrecolor.h" (29 Oct 2021, 1545 Bytes) of package /linux/privat/littleutils-1.2.5.tar.lz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "libpngrecolor.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 1.2.4_vs_1.2.5.

    1 // libpngrecolor.h - part of pngrecolor
    2 // Copyright (C) 2010 by Jason Summers (from original libpngrewrite.h)
    3 // Modifications (C) 2013-2021 by Brian Lindholm
    4 
    5 #ifndef LIBPNGRECOLOR_H_INCLUDED
    6 #define LIBPNGRECOLOR_H_INCLUDED
    7 
    8 #ifdef __cplusplus
    9 extern "C" {
   10 #endif
   11 
   12 #if defined(_WIN32) && !defined(__GNUC__) && !defined(PNGRW_WINDOWS)
   13 # define PNGRW_WINDOWS
   14 #endif
   15 
   16 #ifdef HAVE_STDIO_H
   17 # include <stdio.h>
   18 #endif
   19 
   20 #ifdef PNGRW_WINDOWS
   21 # include <tchar.h>
   22 # define PNGRW_CHAR TCHAR
   23 #else
   24 # define PNGRW_CHAR char
   25 #endif
   26 
   27 struct pngrw_ctx;
   28 struct pngrw_ctx *pngrw_create(void);
   29 void pngrw_destroy(struct pngrw_ctx *ctx);
   30 
   31 int pngrw_read_filename(struct pngrw_ctx *ctx, const PNGRW_CHAR *in_filename, int verbose);
   32 int pngrw_write_filename(struct pngrw_ctx *ctx, const PNGRW_CHAR *out_filename, int no_interlace);
   33 
   34 int pngrw_read_stdio(struct pngrw_ctx *ctx, FILE *infp, int verbose);
   35 int pngrw_write_stdio(struct pngrw_ctx *ctx, FILE *outfp, int no_interlace);
   36 
   37 typedef void (*pngrw_print_fn_type)(struct pngrw_ctx *ctx, const PNGRW_CHAR *s);
   38 
   39 void pngrw_set_print_fn(struct pngrw_ctx *ctx, pngrw_print_fn_type prntfn);
   40 void pngrw_set_error_fn(struct pngrw_ctx *ctx, pngrw_print_fn_type errfn);
   41 
   42 void pngrw_set_userdata(struct pngrw_ctx *ctx, void *u);
   43 void *pngrw_get_userdata(struct pngrw_ctx *ctx);
   44 void pngrw_set_sort_by_frequency(struct pngrw_ctx *ctx, int n);
   45 
   46 int pngrw_optimize_image(struct pngrw_ctx *ctx, int verbose);
   47 
   48 const PNGRW_CHAR *pngrw_get_version_string(void);
   49 
   50 #ifdef __cplusplus
   51 }
   52 #endif
   53 
   54 #endif // LIBPNGRECOLOR_H_INCLUDED