Updated to reflect changes in jpeg.c
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2238 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -1,32 +1,34 @@
|
||||
/* This code was written by Nathan Stenzel for gphoto */
|
||||
/* GPL */
|
||||
|
||||
enum jpegmarker {start=0xD8, APPO=0xE0, quantization=0xDB, huffman=0xC4, SsSeAhAl=0xDA, SOFC0=0xC0};
|
||||
|
||||
const markers[] = {
|
||||
start, APPO, quantization, huffman, SsSeAhAl, SOFC0
|
||||
};
|
||||
|
||||
const char *markernames[] = {
|
||||
"Start", "APPO", "Quantization table", "Huffman table", "SsSeAhAl", "SOFC0" };
|
||||
|
||||
struct chunk{
|
||||
int size;
|
||||
unsigned char *data;
|
||||
};
|
||||
|
||||
chunk_new(struct chunk *mychunk, int length);
|
||||
void chunk_new(struct chunk *mychunk, int length);
|
||||
|
||||
chunk_print(struct chunk *mychunk);
|
||||
void chunk_print(struct chunk *mychunk);
|
||||
|
||||
chunk_destroy(struct chunk *mychunk);
|
||||
void chunk_destroy(struct chunk *mychunk);
|
||||
|
||||
struct jpeg {
|
||||
int count;
|
||||
struct chunk marker[20]; /* I think this should be big enough */
|
||||
};
|
||||
|
||||
jpeg_init(struct jpeg *myjpeg);
|
||||
void jpeg_init(struct jpeg *myjpeg);
|
||||
|
||||
jpeg_destroy(struct jpeg *myjpeg);
|
||||
|
||||
enum jpegmarker {start, APPO, quantization, huffman, SsSeAhAl};
|
||||
|
||||
const char markers[] = {
|
||||
start, APPO, quantization, huffman, SsSeAhAl
|
||||
};
|
||||
void jpeg_destroy(struct jpeg *myjpeg);
|
||||
|
||||
char jpeg_findff(int *location, struct chunk *picture);
|
||||
|
||||
@@ -34,6 +36,8 @@ char jpeg_findactivemarker(char *id, int *location, struct chunk *picture);
|
||||
|
||||
void jpeg_add_marker(struct jpeg *myjpeg, struct chunk *picture, int start, int end);
|
||||
|
||||
char jpeg_parse(struct jpeg *myjpeg, struct chunk *picture);
|
||||
void jpeg_parse(struct jpeg *myjpeg, struct chunk *picture);
|
||||
|
||||
char jpeg_print(struct jpeg *myjpeg);
|
||||
void jpeg_print(struct jpeg *myjpeg);
|
||||
|
||||
char *jpeg_markername(int c);
|
||||
Reference in New Issue
Block a user