3 * @author Rouslan V. Solomakhin
9 int main( int argc, char *argv[] )
12 const char *file_name = "/home/user/MyDocs/Picture.jpg";
14 if ( !photo_initialize( &context, &argc, &argv ) ) {
15 g_critical("Failed to initialize photo camera");
20 for ( int i = 1; i < argc; i++ ) {
21 g_message("Taking a photo %s...", argv[i]);
22 if ( !photo_take( &context, argv[i] ) ) {
23 g_critical("Failed to take a photo");
24 photo_destroy( &context );
29 g_message("Taking a photo %s...", file_name);
30 if ( !photo_take( &context, file_name ) ) {
31 g_critical("Failed to take a photo");
32 photo_destroy( &context );
37 if ( !photo_destroy( &context ) ) {
38 g_critical("Failed to uninitialize photo camera");