24 lines
No EOL
456 B
C
24 lines
No EOL
456 B
C
#ifndef _CIFF_H_
|
|
#define _CIFF_H_
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#define MAX_PATH_LEN 1024
|
|
|
|
typedef struct {
|
|
char magic[4];
|
|
uint64_t header_size;
|
|
uint64_t content_size;
|
|
uint64_t width;
|
|
uint64_t height;
|
|
char* caption;
|
|
char* tags;
|
|
uint8_t* pixels;
|
|
} CIFF;
|
|
|
|
CIFF* read_ciff(FILE* file);
|
|
void generate_jpg(CIFF* ciff, const char* out_filename);
|
|
void free_ciff(CIFF* ciff);
|
|
|
|
#endif |