aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bmp.c b/src/bmp.c
index 046fad6..b641563 100644
--- a/src/bmp.c
+++ b/src/bmp.c
@@ -82,7 +82,7 @@ struct image *bmp_open(FILE *f){
}
if(b->bpp >= 16){
- b->rowwidth = b->img.width * b->bpp;
+ b->rowwidth = b->img.width * b->bpp / 8;
}else{
int i;
b->colours = malloc(b->ncolors * sizeof(struct rgb_t));