Difference between revisions of "Truxton exif set heading"
Jump to navigation
Jump to search
(Created page with "This sets the heading of the location. This is the direction the imaging device was pointed when the image was recorded. =Syntax= <source lang="C"> void truxton_exif_set_head...") |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | This sets the heading of the | + | This sets the heading of the image. |
This is the direction the imaging device was pointed when the image was recorded. | This is the direction the imaging device was pointed when the image was recorded. | ||
| + | This corresponds to the <code>[Heading]</code> column of the <code><nowiki>[</nowiki>[[EXIF Table|EXIF]]<nowiki>]</nowiki></code> table in the database. | ||
=Syntax= | =Syntax= | ||
| Line 31: | Line 32: | ||
} | } | ||
| − | uint64_t exif_handle = truxton_create_exif(truxton); | + | uint64_t exif_handle = truxton_create_exif( truxton ); |
truxton_exif_set_gps_time( exif_handle, data.gps_time ); | truxton_exif_set_gps_time( exif_handle, data.gps_time ); | ||
| Line 74: | Line 75: | ||
printf( "EXIF ID is %s\n", id ); | printf( "EXIF ID is %s\n", id ); | ||
| − | truxton_exif_destroy(exif_handle); | + | truxton_exif_destroy( exif_handle ); |
} | } | ||
</source> | </source> | ||
Latest revision as of 09:25, 10 February 2021
This sets the heading of the image.
This is the direction the imaging device was pointed when the image was recorded.
This corresponds to the [Heading] column of the [EXIF] table in the database.
Contents
Syntax
void truxton_exif_set_heading( uint64_t exif_handle, double value );
Parameters
exif_handle
This handle comes from calling truxton_exif_create() or truxton_file_create_exif().
value
It corresponds to the [Heading] column of the [EXIF] table.
Sample
void add_exif( uint64_t truxton, uint64_t file_handle, uint8_t const * destination_string, size_t max_size )
{
char id[ 40 ];
EXIF_PARSER parser;
parser.Initialize( buffer, buffer_size );
EXIF_DATA data;
if ( fill_exif_data( parser, data ) == 0 )
{
return;
}
uint64_t exif_handle = truxton_create_exif( truxton );
truxton_exif_set_gps_time( exif_handle, data.gps_time );
truxton_exif_set_gps_time_offset( exif_handle, data.offsets.gps_time );
truxton_exif_set_device_time( exif_handle, data.device_time );
truxton_exif_set_device_time_offset( exif_handle, data.offsets.device_time );
truxton_exif_set_latitude( exif_handle, data.latitude );
truxton_exif_set_latitude_offset( exif_handle, data.offsets.latitude );
truxton_exif_set_longitude( exif_handle, data.longitude );
truxton_exif_set_longitude_offset( exif_handle, data.offsets.longitude );
truxton_exif_set_altitude( exif_handle, data.altitude );
truxton_exif_set_altitude_offset( exif_handle, data.offsets.altitude );
truxton_exif_set_heading( exif_handle, data.heading);
truxton_exif_set_heading_offset( exif_handle, data.offsets.heading );
truxton_exif_set_focal_length( exif_handle, data.focal_length );
truxton_exif_set_focal_length_offset( exif_handle, data.offsets.focal_length );
truxton_exif_set_shutter_count( exif_handle, data.shutter_count );
truxton_exif_set_shutter_count_offset( exif_handle, data.offsets.shutter_count );
truxton_exif_set_thumbnail_offset( exif_handle, data.thumbnail_offset );
truxton_exif_set_thumbnail_offset_offset( exif_handle, data.offsets.thumbnail_offset );
truxton_exif_set_thumbnail_length( exif_handle, data.thumbnail_length );
truxton_exif_set_thumbnail_length_offset( exif_handle, data.offsets.thumbnail_length );
truxton_exif_set_make( exif_handle, data.make );
truxton_exif_set_make_offset( exif_handle, data.offsets.make );
truxton_exif_set_model( exif_handle, data.model );
truxton_exif_set_model_offset( exif_handle, data.offsets.model );
truxton_exif_set_body_serial_number( exif_handle, data.body_serial_number );
truxton_exif_set_body_serial_number_offset( exif_handle, data.offsets.body_serial_number );
truxton_exif_set_lens_serial_number( exif_handle, data.lens_serial_number );
truxton_exif_set_lens_serial_number_offset( exif_handle, data.offsets.lens_serial_number );
truxton_file_get_id( file_handle, id, sizeof( id ) );
truxton_exif_set_file_id( exif_handle, id );
truxton_file_get_media_id( file_handle, id, sizeof( id ) );
truxton_exif_set_media_id( exif_handle, id );
truxton_exif_save( exif_handle );
truxton_exif_get_id( exif_handle, id, sizeof( id ) );
printf( "EXIF ID is %s\n", id );
truxton_exif_destroy( exif_handle );
}