summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/pictureflow.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c
index 272a691306..977b18c1fb 100644
--- a/apps/plugins/pictureflow.c
+++ b/apps/plugins/pictureflow.c
@@ -857,7 +857,7 @@ int read_pfraw(char* filename)
857 857
858 858
859/** 859/**
860 Create the slide with it's reflection for the given slide_index and filename 860 Create the slide with its reflection for the given slide_index and filename
861 and store it as pfraw in CACHE_PREFIX/[slide_index].pfraw 861 and store it as pfraw in CACHE_PREFIX/[slide_index].pfraw
862 */ 862 */
863bool create_bmp(struct bitmap *input_bmp, char *target_path, bool resize) 863bool create_bmp(struct bitmap *input_bmp, char *target_path, bool resize)
@@ -866,17 +866,22 @@ bool create_bmp(struct bitmap *input_bmp, char *target_path, bool resize)
866 866
867 output_bmp.format = input_bmp->format; 867 output_bmp.format = input_bmp->format;
868 output_bmp.data = (char *)output_bmp_buffer; 868 output_bmp.data = (char *)output_bmp_buffer;
869 if ( resize ) { /* resize image and swap buffers */ 869
870 if ( resize ) {
871 /* resize image */
870 output_bmp.width = config.avg_album_width; 872 output_bmp.width = config.avg_album_width;
871 output_bmp.height = config.avg_album_width; 873 output_bmp.height = config.avg_album_width;
872 simple_resize_bitmap(input_bmp, &output_bmp); 874 simple_resize_bitmap(input_bmp, &output_bmp);
873 input_bmp->data = output_bmp.data; 875
876 /* Resized bitmap is now in the output buffer,
877 copy it back to the input buffer */
878 rb->memcpy(input_bmp_buffer, output_bmp_buffer,
879 config.avg_album_width * config.avg_album_width * sizeof(fb_data));
880 input_bmp->data = (char *)input_bmp_buffer;
874 input_bmp->width = output_bmp.width; 881 input_bmp->width = output_bmp.width;
875 input_bmp->height = output_bmp.height; 882 input_bmp->height = output_bmp.height;
876 output_bmp.data = (char *)input_bmp_buffer;
877 output_bmp.width = input_bmp->width * 2;
878 output_bmp.height = input_bmp->height;
879 } 883 }
884
880 output_bmp.width = input_bmp->width * 2; 885 output_bmp.width = input_bmp->width * 2;
881 output_bmp.height = input_bmp->height; 886 output_bmp.height = input_bmp->height;
882 887