From fa53229528706ca8e5ae6f112732daedaf12a0f1 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 28 Jan 2024 20:27:16 +0000 Subject: update HISTORY git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4840 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/ppm/ppmtowinicon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'converter') diff --git a/converter/ppm/ppmtowinicon.c b/converter/ppm/ppmtowinicon.c index e3c6a5c5..69baa2f6 100644 --- a/converter/ppm/ppmtowinicon.c +++ b/converter/ppm/ppmtowinicon.c @@ -402,9 +402,9 @@ newBitmap(unsigned int const bpp, unsigned int const rows, colorhash_table const cht) { - unsigned int const xByteCt = ROUNDUP(cols, 32)/8; - /* How wide the u1 string for each row should be -- Each byte is 8 - pixels, but must be a multiple of 4 bytes. + unsigned int const xByteCt = ROUNDUP(cols * bpp, 32)/8; + /* How wide the u1 string for each row should be. Pixels are packed + into bytes, padded to a multiple of 4 bytes. */ ICON_bmp * icBitmapP; /* malloc'ed */ u1 ** rowData; /* malloc'ed */ -- cgit 1.4.1