You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.6 KiB
C
63 lines
1.6 KiB
C
/*
|
|
* EXIF date tool
|
|
*
|
|
* (c) Alexander Vdolainen 2023 <alex@vapaa.xyz>
|
|
*
|
|
* this is free software: you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published
|
|
* by the Free Software Foundation, either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* this is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
* See the GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.";
|
|
*
|
|
*/
|
|
|
|
#ifndef __EXIJPEG_H__
|
|
#define __EXIJPEG_H__
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
#include <string.h>
|
|
#include <time.h>
|
|
|
|
#include <libexif/exif-data.h>
|
|
|
|
struct exijpeg_segment {
|
|
unsigned char *hd;
|
|
unsigned long length;
|
|
struct exijpeg_segment *next;
|
|
};
|
|
|
|
typedef struct __exijpeg_data_type {
|
|
unsigned char *data;
|
|
char *filename;
|
|
size_t length;
|
|
int fd;
|
|
struct exijpeg_segment *segments;
|
|
struct exijpeg_segment *last;
|
|
} exijpeg_data_t;
|
|
|
|
exijpeg_data_t *exijpeg_data_alloc(void);
|
|
|
|
void exijpeg_data_free(exijpeg_data_t *);
|
|
|
|
/* adds a segment to jpeg_data_t */
|
|
int exijpeg_data_add_segment(exijpeg_data_t *, unsigned char *, unsigned long);
|
|
|
|
/* loads a file to jpeg structure */
|
|
int exijpeg_data_loadfile(exijpeg_data_t *, const char *);
|
|
|
|
/* release any resources allocated from the system during open file proc */
|
|
int exijpeg_data_release(exijpeg_data_t *);
|
|
|
|
#endif
|