Difference between revisions of "Truxton subject set picture"
Jump to navigation
Jump to search
(Created page with "This allows you to set the picture of the subject. This will be stored in the <code>[PictureBase64Png]</code> column of the <code>[Suspect]</code> table. =Syntax= <source lan...") |
|||
| Line 4: | Line 4: | ||
=Syntax= | =Syntax= | ||
<source lang="C"> | <source lang="C"> | ||
| − | void truxton_subject_set_picture( uint64_t subject_handle, char * | + | void truxton_subject_set_picture( uint64_t subject_handle, char const * value ); |
</source> | </source> | ||
Latest revision as of 16:06, 16 February 2021
This allows you to set the picture of the subject.
This will be stored in the [PictureBase64Png] column of the [Suspect] table.
Syntax
void truxton_subject_set_picture( uint64_t subject_handle, char const * value );
Parameters
subject_handle
The handle to the subject object.
This comes from calling truxton_subject_create().
value
A base64 encoded PNG image of the suspect.
Sample
void create_villan( uint64_t truxton )
{
uint64_t subject = truxton_subject_create( truxton );
truxton_subject_set_name( subject, "Khaka Peü Peü" );
truxton_subject_set_description( subject, "Last name translates to 'This strong hand or that strong hand.'" );
truxton_subject_set_custom( subject, "Danville PD Tri-State ID: TSA-785543" );
truxton_subject_set_birthday( subject, to_ticks( "1963-09-18" ) );
truxton_subject_set_id( subject, "5068696E-6561-7320-616E-642046657262" );
truxton_subject_set_picture( subject, base64_encode( "C:\Subjects\Photos\KPP.png" ) );
// Commit the data to the database
truxton_subject_save( subject );
truxton_subject_tag( subject, "Prime Suspect", "As identified by The Beak", TAG_ORIGIN_HUMAN );
truxton_subject_destroy( subject );
}