libcaesium/caesium/caesium.h

64 lines
1013 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
2017-01-30 12:45:07 +01:00
#ifdef __cplusplus
extern "C" {
#endif
2016-11-04 11:00:04 +01:00
#include <stdbool.h>
2017-06-03 12:22:23 +02:00
#include <string.h>
2016-11-15 09:47:09 +01:00
typedef struct cs_jpeg_pars
{
int quality;
bool exif_copy;
int dct_method;
2017-12-29 23:09:13 +01:00
double scale_factor;
2016-11-15 09:47:09 +01:00
/*
* 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;
2017-12-29 23:09:13 +01:00
double scale_factor;
2016-11-15 09:47:09 +01:00
} cs_png_pars;
typedef struct cs_image_pars
{
cs_jpeg_pars jpeg;
cs_png_pars png;
} cs_image_pars;
typedef enum image_type
{
2017-02-25 10:17:33 +01:00
CS_JPEG,
CS_PNG,
2016-11-15 09:47:09 +01:00
UNKN,
} image_type;
typedef enum error_level
{
ERROR = 0,
WARNING = 1
} error_level;
2016-11-04 11:00:04 +01:00
2019-12-23 18:48:19 +01:00
bool cs_compress(const char *input_path, const char *output_path, cs_image_pars *options, int* err_n);
2017-02-21 12:54:52 +01:00
cs_image_pars initialize_parameters();
2016-11-04 11:00:04 +01:00
2017-01-30 12:45:07 +01:00
#ifdef __cplusplus
}
#endif
2016-11-04 11:00:04 +01:00
#endif