mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Picture handling: change data structure to store offset instead timestamp
It makes no sense to store a 64bit time stamp with every picture. Even the 32bit offset (in seconds) from the dive start is WAY overkill. But switching to that makes the code much more simple in a number of spots. And makes what is saved to the XML file easier to read, too. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3a14076b1d
commit
1604299a5b
5 changed files with 13 additions and 12 deletions
|
|
@ -264,7 +264,7 @@ extern "C" xsltStylesheetPtr get_stylesheet(const char *name)
|
|||
return xslt;
|
||||
}
|
||||
|
||||
extern "C" void picture_load_exif_data(struct picture *p)
|
||||
extern "C" void picture_load_exif_data(struct picture *p, timestamp_t *timestamp)
|
||||
{
|
||||
EXIFInfo exif;
|
||||
memblock mem;
|
||||
|
|
@ -273,7 +273,7 @@ extern "C" void picture_load_exif_data(struct picture *p)
|
|||
goto picture_load_exit;
|
||||
if (exif.parseFrom((const unsigned char *)mem.buffer, (unsigned)mem.size) != PARSE_EXIF_SUCCESS)
|
||||
goto picture_load_exit;
|
||||
p->timestamp = exif.epoch();
|
||||
*timestamp = exif.epoch();
|
||||
p->longitude.udeg= lrint(1000000.0 * exif.GeoLocation.Longitude);
|
||||
p->latitude.udeg = lrint(1000000.0 * exif.GeoLocation.Latitude);
|
||||
picture_load_exit:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue