24 #ifndef __GPHOTO2_JPEG_H__ 25 #define __GPHOTO2_JPEG_H__ 30 JPEG_START=0xD8, JPEG_COMMENT=0xFE, JPEG_APPO=0xE0,
31 JPEG_QUANTIZATION=0xDB, JPEG_HUFFMAN=0xC4, JPEG_SOFC0=0xC0,
32 JPEG_SSSEAHAL=0xDA, JPEG_EOI=0xD9
40 typedef char jpeg_quantization_table[64];
44 struct chunk *marker[20];
47 chunk *gpi_jpeg_chunk_new(
int length);
48 chunk *gpi_jpeg_chunk_new_filled(
int length,
char *data);
49 void gpi_jpeg_chunk_destroy(
chunk *mychunk);
50 void gpi_jpeg_chunk_print(
chunk *mychunk);
52 char gpi_jpeg_findff(
int *location,
chunk *picture);
53 char gpi_jpeg_findactivemarker(
char *
id,
int *location,
chunk *picture);
54 char *gpi_jpeg_markername(
unsigned int c);
56 jpeg *gpi_jpeg_new (
void);
57 void gpi_jpeg_destroy (
jpeg *myjpeg);
58 void gpi_jpeg_add_marker (
jpeg *myjpeg,
chunk *picture,
int start,
int end);
59 void gpi_jpeg_add_chunk (
jpeg *myjpeg,
chunk *source);
60 void gpi_jpeg_parse (
jpeg *myjpeg,
chunk *picture);
61 void gpi_jpeg_print (
jpeg *myjpeg);
63 chunk *gpi_jpeg_make_start (
void);
64 chunk *gpi_jpeg_make_SOFC (
int width,
int height,
65 char vh1,
char vh2,
char vh3,
66 char q1,
char q2,
char q3);
67 chunk *gpi_jpeg_makeSsSeAhAl (
int huffset1,
int huffset2,
int huffset3);
69 void gpi_jpeg_print_quantization_table(jpeg_quantization_table *table);
70 chunk *gpi_jpeg_make_quantization(
const jpeg_quantization_table * table,
char number);
71 jpeg_quantization_table *gpi_jpeg_quantization2table(
chunk *qmarker);
73 jpeg *gpi_jpeg_header(
int width,
int height,
74 char vh1,
char vh2,
char vh3,
75 char q1,
char q2,
char q3,
76 const jpeg_quantization_table *quant1,
const jpeg_quantization_table *quant2,
77 char huffset1,
char huffset2,
char huffset3,
80 char gpi_jpeg_write(
CameraFile *file,
const char *name,
jpeg *myjpeg);
Abstracted gphoto2 file operations.