aboutsummaryrefslogtreecommitdiffstats
path: root/wr/write-ppm.c
diff options
context:
space:
mode:
Diffstat (limited to 'wr/write-ppm.c')
-rw-r--r--wr/write-ppm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/wr/write-ppm.c b/wr/write-ppm.c
index 016f0ba..1bb1f53 100644
--- a/wr/write-ppm.c
+++ b/wr/write-ppm.c
@@ -19,13 +19,14 @@ ppm_write(FILE *fp, struct ida_image *img)
"# https://www.kraxel.org/blog/linux/fbida/\n"
"%d %d\n255\n",
img->i.width,img->i.height);
- fwrite(img->data, img->i.height, 3*img->i.width, fp);
+ fwrite(ida_image_scanline(img, 0),
+ img->i.height, 3*img->i.width, fp);
return 0;
}
static struct ida_writer ppm_writer = {
label: "PPM",
- ext: { "ppm", NULL},
+ ext: { "ppm", NULL },
write: ppm_write,
};