summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index 065d45529..52a95ef80 100644
--- a/dive.c
+++ b/dive.c
@@ -2269,6 +2269,17 @@ struct picture *alloc_picture()
return pic;
}
+void dive_create_picture(struct dive *d, char *filename, int shift_time)
+{
+ struct picture *p = alloc_picture();
+ if (p->timestamp)
+ p->timestamp += shift_time;
+ p->filename = filename;
+ picture_load_exif_data(p);
+ dive_add_picture(d, p);
+ dive_set_geodata_from_picture(d, p);
+}
+
void dive_add_picture(struct dive *d, struct picture *picture)
{
if (d->picture_list == NULL) {