|
@@ -387,16 +387,21 @@ postprocess_internal(char *burst_dir, char *target_dir, int keep)
|
|
|
snprintf(outpath, sizeof(outpath), "%s.jpg", target_dir);
|
|
|
|
|
|
if (first) {
|
|
|
- first = 0;
|
|
|
imagedata = read_exif(path);
|
|
|
exif = create_exif(imagedata);
|
|
|
}
|
|
|
decoded = debayer_file(path);
|
|
|
- fprintf(stderr, "JPEG %s\n", namelist[burst_size]->d_name);
|
|
|
- save_jpeg(outpath, decoded, 90, exif);
|
|
|
+ if(keep || first) {
|
|
|
+ fprintf(stderr, "JPEG %s\n", namelist[burst_size]->d_name);
|
|
|
+ save_jpeg(outpath, decoded, 90, exif);
|
|
|
+ }
|
|
|
fprintf(stderr, "CONVERG %s\n", namelist[burst_size]->d_name);
|
|
|
stacker_add_image(stacker, decoded->data, decoded->width, decoded->height);
|
|
|
free(namelist[burst_size]);
|
|
|
+
|
|
|
+ if (first) {
|
|
|
+ first = 0;
|
|
|
+ }
|
|
|
}
|
|
|
free(namelist);
|
|
|
|