Index: apps/plugins/pictureflow.c =================================================================== --- apps/plugins/pictureflow.c (révision 15900) +++ apps/plugins/pictureflow.c (copie de travail) @@ -533,10 +533,15 @@ int ret; input_bmp.data = (char *) &input_bmp_buffer; ret = rb->read_bmp_file(tmp_path_name, &input_bmp, sizeof(input_bmp_buffer), FORMAT_NATIVE); - if (ret <= 0) continue; /* skip missing/broken files */ + if (ret <= 0) { + rb->splash(HZ, "couldn't read bmp"); + continue; /* skip missing/broken files */ + } rb->snprintf(tmp_path_name, sizeof(tmp_path_name), CACHE_PREFIX "/%d.pfraw", i); - create_bmp(&input_bmp, tmp_path_name); + if (!create_bmp(&input_bmp, tmp_path_name)) { + rb->splash(HZ, "couldn't write bmp"); + } if ( rb->button_get(false) == PICTUREFLOW_MENU ) return false; } int fh = rb->creat( CACHE_PREFIX "/ready" ); @@ -720,13 +725,13 @@ /** Safe the given bitmap as filename in the pfraw format */ -int save_pfraw(char* filename, struct bitmap *bm) +bool save_pfraw(char* filename, struct bitmap *bm) { struct pfraw_header bmph; bmph.width = bm->width; bmph.height = bm->height; int fh = rb->creat( filename ); - if( fh < 0 ) return -1; + if( fh < 0 ) return false; rb->write( fh, &bmph, sizeof( struct pfraw_header ) ); int y; for( y = 0; y < bm->height; y++ ) @@ -735,7 +740,7 @@ rb->write( fh, d, sizeof( fb_data ) * bm->width ); } rb->close( fh ); - return 0; + return true; } @@ -815,8 +820,7 @@ LCD_RGBPACK(r, g, b); } } - save_pfraw(target_path, &output_bmp); - return true; + return save_pfraw(target_path, &output_bmp); }