From ae121de14920fd2176311cb2cfb5d02b0a469cfe Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Sun, 20 Mar 2022 19:22:46 +0100 Subject: PictureFlow: Write bitmaps in one go Analogous to an earlier change w.r.t. reading bitmaps Change-Id: I68e71160b51eb893f18071cc77d9c9a3ef84de0f --- apps/plugins/pictureflow/pictureflow.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 3074771e32..73eee2e4c4 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -2022,13 +2022,7 @@ static bool save_pfraw(char* filename, struct bitmap *bm) int fh = rb->open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0666); if( fh < 0 ) return false; rb->write( fh, &bmph, sizeof( struct pfraw_header ) ); - pix_t *data = (pix_t*)( bm->data ); - int y; - for( y = 0; y < bm->height; y++ ) - { - rb->write( fh, data , sizeof( pix_t ) * bm->width ); - data += bm->width; - } + rb->write( fh, bm->data , sizeof( pix_t ) * bm->width * bm->height ); rb->close( fh ); return true; } -- cgit v1.2.3