diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-04-13 16:08:14 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2013-04-13 16:08:14 +0000 |
commit | 703b2d269a0d1e1be92e89f5d6b070ab9d3be31b (patch) | |
tree | 3a3f42e6a146c8846cc1604a4abb90097eabd805 /converter/ppm | |
parent | 04801c35a7bd8c802028a72d8355f027b50cd29f (diff) | |
download | netpbm-mirror-703b2d269a0d1e1be92e89f5d6b070ab9d3be31b.tar.gz netpbm-mirror-703b2d269a0d1e1be92e89f5d6b070ab9d3be31b.tar.xz netpbm-mirror-703b2d269a0d1e1be92e89f5d6b070ab9d3be31b.zip |
Release 10.62.02
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@1880 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/ppm')
-rw-r--r-- | converter/ppm/ppmtowinicon.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/converter/ppm/ppmtowinicon.c b/converter/ppm/ppmtowinicon.c index 836c55d8..c673798f 100644 --- a/converter/ppm/ppmtowinicon.c +++ b/converter/ppm/ppmtowinicon.c @@ -204,18 +204,13 @@ createAndBitmap (gray ** const ba, int const cols, int const rows, * How wide should the u1 string for each row be? * each byte is 8 pixels, but must be a multiple of 4 bytes. */ + unsigned int const xBytes = ROUNDUP(cols, 32)/8; ICON_bmp icBitmap; - int xBytes,y,x; - int wt = cols; + int y,x; u1 ** rowData; MALLOCVAR_NOFAIL(icBitmap); - wt >>= 3; - if (wt & 3) { - wt = (wt & ~3) + 4; - } - xBytes = wt; MALLOCARRAY_NOFAIL(rowData, rows); icBitmap->xBytes = xBytes; icBitmap->data = rowData; |