AlbumShaper
1.0a3
|
Go to the source code of this file.
Macros | |
#define | NEXTBYTE() getc(infile) |
#define | M_SOF0 0xC0 /* Start Of Frame N */ |
#define | M_SOF1 0xC1 /* N indicates which compression process */ |
#define | M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ |
#define | M_SOF3 0xC3 |
#define | M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ |
#define | M_SOF6 0xC6 |
#define | M_SOF7 0xC7 |
#define | M_SOF9 0xC9 |
#define | M_SOF10 0xCA |
#define | M_SOF11 0xCB |
#define | M_SOF13 0xCD |
#define | M_SOF14 0xCE |
#define | M_SOF15 0xCF |
#define | M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ |
#define | M_EOI 0xD9 /* End Of Image (end of datastream) */ |
#define | M_SOS 0xDA /* Start Of Scan (begins compressed data) */ |
#define | M_APP0 0xE0 /* Application-specific marker, type N */ |
#define | M_APP12 0xEC /* (we don't bother to list all 16 APPn's) */ |
#define | M_COM 0xFE /* COMment */ |
#define | READ_BINARY "rb" |
Functions | |
bool | process_SOFn (int &width, int &height) |
bool | skip_variable () |
bool | read_1_byte (int *res) |
bool | read_2_bytes (unsigned int *res) |
bool | first_marker (int *res) |
bool | next_marker (int *res) |
bool | getJPEGSize (const char *filename, int &width, int &height) |
Variables | |
FILE * | infile |
#define M_APP0 0xE0 /* Application-specific marker, type N */ |
Definition at line 42 of file jpegSize.cpp.
#define M_APP12 0xEC /* (we don't bother to list all 16 APPn's) */ |
Definition at line 43 of file jpegSize.cpp.
#define M_COM 0xFE /* COMment */ |
Definition at line 44 of file jpegSize.cpp.
#define M_EOI 0xD9 /* End Of Image (end of datastream) */ |
Definition at line 40 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOF0 0xC0 /* Start Of Frame N */ |
Definition at line 26 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOF1 0xC1 /* N indicates which compression process */ |
Definition at line 27 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOF10 0xCA |
Definition at line 34 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOF11 0xCB |
Definition at line 35 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOF13 0xCD |
Definition at line 36 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOF14 0xCE |
Definition at line 37 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOF15 0xCF |
Definition at line 38 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ |
Definition at line 28 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOF3 0xC3 |
Definition at line 29 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ |
Definition at line 30 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOF6 0xC6 |
Definition at line 31 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOF7 0xC7 |
Definition at line 32 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOF9 0xC9 |
Definition at line 33 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ |
Definition at line 39 of file jpegSize.cpp.
Referenced by first_marker().
#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ |
Definition at line 41 of file jpegSize.cpp.
Referenced by getJPEGSize().
#define NEXTBYTE | ( | ) | getc(infile) |
Definition at line 18 of file jpegSize.cpp.
Referenced by first_marker(), read_1_byte(), and read_2_bytes().
#define READ_BINARY "rb" |
Definition at line 52 of file jpegSize.cpp.
Referenced by getJPEGSize().
bool first_marker | ( | int * | res | ) |
Definition at line 149 of file jpegSize.cpp.
References M_SOI, and NEXTBYTE.
Referenced by getJPEGSize().
bool getJPEGSize | ( | const char * | filename, |
int & | width, | ||
int & | height | ||
) |
Definition at line 65 of file jpegSize.cpp.
References first_marker(), infile, M_EOI, M_SOF0, M_SOF1, M_SOF10, M_SOF11, M_SOF13, M_SOF14, M_SOF15, M_SOF2, M_SOF3, M_SOF5, M_SOF6, M_SOF7, M_SOF9, M_SOS, next_marker(), process_SOFn(), READ_BINARY, and skip_variable().
Referenced by getImageSize(), and isJpeg().
bool next_marker | ( | int * | res | ) |
bool process_SOFn | ( | int & | width, |
int & | height | ||
) |
Definition at line 261 of file jpegSize.cpp.
References read_1_byte(), and read_2_bytes().
Referenced by getJPEGSize().
bool read_1_byte | ( | int * | res | ) |
Definition at line 202 of file jpegSize.cpp.
References NEXTBYTE.
Referenced by next_marker(), process_SOFn(), and skip_variable().
bool read_2_bytes | ( | unsigned int * | res | ) |
Definition at line 216 of file jpegSize.cpp.
References NEXTBYTE.
Referenced by process_SOFn(), and skip_variable().
bool skip_variable | ( | ) |
Definition at line 237 of file jpegSize.cpp.
References read_1_byte(), and read_2_bytes().
Referenced by getJPEGSize().
FILE* infile |
Definition at line 56 of file jpegSize.cpp.
Referenced by getJPEGSize().