libcaesium/caesium/caesium.h

53 lines
814 B
C
Raw Normal View History

2016-11-13 14:43:54 +01:00
#ifndef LIBCAESIUM_CAESIUM_H
#define LIBCAESIUM_CAESIUM_H
2016-11-04 11:00:04 +01:00
#include <stdbool.h>
2016-11-15 09:47:09 +01:00
typedef struct cs_jpeg_pars
{
int quality;
bool exif_copy;
int dct_method;
/*
* Parameters you have no reason to set as they will be
* overwritten during the process
*/
int color_space;
int subsample;
2016-11-15 09:47:09 +01:00
int width;
int height;
} cs_jpeg_pars;
typedef struct cs_png_pars
{
int iterations;
int iterations_large;
int block_split_strategy;
bool lossy_8;
bool transparent;
int auto_filter_strategy;
} cs_png_pars;
typedef struct cs_image_pars
{
cs_jpeg_pars jpeg;
cs_png_pars png;
} cs_image_pars;
typedef enum image_type
{
JPEG,
PNG,
UNKN,
} image_type;
typedef enum error_level
{
ERROR = 0,
WARNING = 1
} error_level;
2016-11-04 11:00:04 +01:00
bool cs_compress(const char *input, const char *output, cs_image_pars *options);
#endif