| Revision 744,
1.8 KB
checked in by phyrephox, 4 years ago
(diff) |
|
/* maintenance */
|
-
Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 | //DNG related stuff |
|---|
| 2 | |
|---|
| 3 | #ifndef DNG_H |
|---|
| 4 | #define DNG_H |
|---|
| 5 | |
|---|
| 6 | struct dir_entry{unsigned short tag; unsigned short type; unsigned int count; unsigned int offset;}; |
|---|
| 7 | |
|---|
| 8 | #define T_BYTE 1 |
|---|
| 9 | #define T_ASCII 2 |
|---|
| 10 | #define T_SHORT 3 |
|---|
| 11 | #define T_LONG 4 |
|---|
| 12 | #define T_RATIONAL 5 |
|---|
| 13 | #define T_SBYTE 6 |
|---|
| 14 | #define T_UNDEFINED 7 |
|---|
| 15 | #define T_SSHORT 8 |
|---|
| 16 | #define T_SLONG 9 |
|---|
| 17 | #define T_SRATIONAL 10 |
|---|
| 18 | #define T_FLOAT 11 |
|---|
| 19 | #define T_DOUBLE 12 |
|---|
| 20 | |
|---|
| 21 | #define CAM_DEFAULT_CROP_ORIGIN_W ((CAM_ACTIVE_AREA_X2-CAM_ACTIVE_AREA_X1-CAM_JPEG_WIDTH )/2) |
|---|
| 22 | #define CAM_DEFAULT_CROP_ORIGIN_H ((CAM_ACTIVE_AREA_Y2-CAM_ACTIVE_AREA_Y1-CAM_JPEG_HEIGHT)/2) |
|---|
| 23 | |
|---|
| 24 | //thumbnail |
|---|
| 25 | #define DNG_TH_WIDTH 128 |
|---|
| 26 | #define DNG_TH_HEIGHT 96 |
|---|
| 27 | // higly recommended that DNG_TH_WIDTH*DNG_TH_HEIGHT would be divisible by 512 |
|---|
| 28 | |
|---|
| 29 | struct t_data_for_exif{ |
|---|
| 30 | unsigned long time; |
|---|
| 31 | short iso; |
|---|
| 32 | short tv; |
|---|
| 33 | short av; |
|---|
| 34 | short exp_bias; |
|---|
| 35 | int exp_program; |
|---|
| 36 | short max_av; |
|---|
| 37 | int focal_length; |
|---|
| 38 | int effective_focal_length; |
|---|
| 39 | short orientation; |
|---|
| 40 | short flash_mode; |
|---|
| 41 | short flash_fired; |
|---|
| 42 | short metering_mode; |
|---|
| 43 | }; |
|---|
| 44 | |
|---|
| 45 | void create_dng_header(struct t_data_for_exif* exif_data); |
|---|
| 46 | void free_dng_header(void); |
|---|
| 47 | char* get_dng_header(void); |
|---|
| 48 | int get_dng_header_size(void); |
|---|
| 49 | |
|---|
| 50 | struct t_data_for_exif* capture_data_for_exif(void); |
|---|
| 51 | |
|---|
| 52 | char *get_date_for_exif(unsigned long time); |
|---|
| 53 | unsigned int* get_av_for_exif(short av); |
|---|
| 54 | int* get_tv_for_exif(short tv); |
|---|
| 55 | unsigned int* get_max_av_for_exif(short max_av); |
|---|
| 56 | int* get_exp_bias_for_exif(short exp_bias); |
|---|
| 57 | unsigned short get_exp_program_for_exif(int exp_program); |
|---|
| 58 | unsigned int* get_focal_length_for_exif(int focal_length); |
|---|
| 59 | unsigned short get_orientation_for_exif(short orientation); |
|---|
| 60 | unsigned short get_flash_mode_for_exif(short mode, short fired); |
|---|
| 61 | unsigned short get_metering_mode_for_exif(short metering_mode); |
|---|
| 62 | int* get_shutter_speed_for_exif(short tv); |
|---|
| 63 | int* get_aperture_for_exif(short av); |
|---|
| 64 | |
|---|
| 65 | void convert_dng_to_chdk_raw(char* fn); |
|---|
| 66 | |
|---|
| 67 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.