Moved typedefs to a separate header
This commit is contained in:
parent
6439cdcbd3
commit
056c59bf40
|
@ -0,0 +1,41 @@
|
||||||
|
#ifndef CCLT_CCLTYPES
|
||||||
|
#define CCLT_CCLTYPES
|
||||||
|
|
||||||
|
typedef struct cclt_jpeg_parameters {
|
||||||
|
int quality;
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
|
int color_space;
|
||||||
|
int dct_method;
|
||||||
|
bool exif_copy;
|
||||||
|
bool lossless;
|
||||||
|
enum TJSAMP subsample;
|
||||||
|
} cclt_jpeg_parameters;
|
||||||
|
|
||||||
|
typedef struct cclt_png_parameters {
|
||||||
|
int iterations;
|
||||||
|
int iterations_large;
|
||||||
|
int block_split_strategy;
|
||||||
|
bool lossy_8;
|
||||||
|
bool transparent;
|
||||||
|
int auto_filter_strategy;
|
||||||
|
} cclt_png_parameters;
|
||||||
|
|
||||||
|
typedef struct cclt_parameters {
|
||||||
|
cclt_jpeg_parameters jpeg;
|
||||||
|
cclt_png_parameters png;
|
||||||
|
|
||||||
|
char* output_folder;
|
||||||
|
char** input_files;
|
||||||
|
int input_files_count;
|
||||||
|
bool recursive;
|
||||||
|
bool structure;
|
||||||
|
} cclt_parameters;
|
||||||
|
|
||||||
|
enum image_type {
|
||||||
|
JPEG,
|
||||||
|
PNG,
|
||||||
|
UNKN,
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
38
src/utils.h
38
src/utils.h
|
@ -5,47 +5,11 @@
|
||||||
#include <turbojpeg.h>
|
#include <turbojpeg.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include "ccltypes.h"
|
||||||
|
|
||||||
#define APP_VERSION "0.9.1"
|
#define APP_VERSION "0.9.1"
|
||||||
#define BUILD 20160808
|
#define BUILD 20160808
|
||||||
|
|
||||||
typedef struct cclt_jpeg_parameters {
|
|
||||||
int quality;
|
|
||||||
int width;
|
|
||||||
int height;
|
|
||||||
int color_space;
|
|
||||||
int dct_method;
|
|
||||||
bool exif_copy;
|
|
||||||
bool lossless;
|
|
||||||
enum TJSAMP subsample;
|
|
||||||
} cclt_jpeg_parameters;
|
|
||||||
|
|
||||||
typedef struct cclt_png_parameters {
|
|
||||||
int iterations;
|
|
||||||
int iterations_large;
|
|
||||||
int block_split_strategy;
|
|
||||||
bool lossy_8;
|
|
||||||
bool transparent;
|
|
||||||
int auto_filter_strategy;
|
|
||||||
} cclt_png_parameters;
|
|
||||||
|
|
||||||
typedef struct cclt_parameters {
|
|
||||||
cclt_jpeg_parameters jpeg;
|
|
||||||
cclt_png_parameters png;
|
|
||||||
|
|
||||||
char* output_folder;
|
|
||||||
char** input_files;
|
|
||||||
int input_files_count;
|
|
||||||
bool recursive;
|
|
||||||
bool structure;
|
|
||||||
} cclt_parameters;
|
|
||||||
|
|
||||||
enum image_type {
|
|
||||||
JPEG,
|
|
||||||
PNG,
|
|
||||||
UNKN,
|
|
||||||
};
|
|
||||||
|
|
||||||
int string_to_int(char* in_string);
|
int string_to_int(char* in_string);
|
||||||
void print_help();
|
void print_help();
|
||||||
int mkpath(const char *pathname, mode_t mode);
|
int mkpath(const char *pathname, mode_t mode);
|
||||||
|
|
Loading…
Reference in New Issue