Truxton exif create
Jump to navigation
Jump to search
This creates an Exchangeable image file format object.
You can use this to add records to the [EXIF] table in the database.
Syntax
uint64_t truxton_exif_create( uint64_t truxton_handle );
Parameters
truxton_handle
The Truxton instance this event will belong.
This handle comes from calling truxton_create().
Return value
A handle to an EXIF object.
Sample
1 void add_exif(uint64_t truxton, uint64_t file_handle, uint8_t const * buffer, size_t buffer_size )
2 {
3 EXIF_PARSER parser;
4
5 parser.Initialize( buffer, buffer_size );
6
7 EXIF_DATA data;
8
9 if ( fill_exif_data( parser, data ) == 0 )
10 {
11 return;
12 }
13
14 uint64_t exif_handle = truxton_create_exif(truxton);
15
16 truxton_exif_save( exif_handle );
17
18 char id[ 65 ];
19
20 truxton_exif_get_id( exif_handle, id, sizeof( id ) );
21
22 printf( "EXIF ID is %s\n", id );
23
24 truxton_exif_destroy(exif_handle);
25 }