mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Include images in profile
This adds an entry to the dive list context menu to load images. The user can select image files and set a time offset to align camera and dive computer clocks. Using the exif time stamp the images are tried to match to the times of the selected dives (with a grace period of an hour before and after the dive). Upon success an event of type 123 is created per image with the string value being the path to the image. Those images are displayed as thumbnails in the profile. If the matching dive does not yet have a geo location specified but the image provides one it is copied to the dive (making the camera a poor man's companion app). This patch includes easyexif https://code.google.com/p/easyexif/ which is originally under a New BSD License to parse the image meta data. This commit includes a new test dive dives/test31.xml with a matching image wreck.jpg to try out the functionallity. Obvious to do's: Have images on the map Have the images clickable Have a proper picture viewer Give visual reference for image time shifting. Use the new profile Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c84ef319a2
commit
5c1abde2a5
14 changed files with 1015 additions and 1 deletions
9
dive.h
9
dive.h
|
@ -614,6 +614,11 @@ static inline struct dive *getDiveById(int id)
|
|||
}
|
||||
return dive;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct dive *find_dive_including(timestamp_t when);
|
||||
extern bool dive_within_time_range(struct dive *dive, timestamp_t when, timestamp_t offset);
|
||||
struct dive *find_dive_n_near(timestamp_t when, int n, timestamp_t offset);
|
||||
|
@ -692,6 +697,10 @@ extern void set_dc_nickname(struct dive *dive);
|
|||
extern void set_autogroup(bool value);
|
||||
extern int total_weight(struct dive *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define DIVE_ERROR_PARSE 1
|
||||
#define DIVE_ERROR_PLAN 2
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue