From: short <> Date: Sun, 16 Dec 2001 07:58:57 +0000 (+0000) Subject: Fixed row alignment of OTA bitmap for --picture-send (when (width%8)!=0) X-Git-Tag: mdsms_1_5_3~6 X-Git-Url: https://git.jankratochvil.net/?p=mdsms.git;a=commitdiff_plain;h=c499154e59b6914effd3001a058ba487ccc0b458;hp=0bd1ccac2b66ee61dc7d6f658c4f7c80c00355b3 Fixed row alignment of OTA bitmap for --picture-send (when (width%8)!=0) - Nokia SmartMessaging spec. 3.0, paragraph 3.7.1.2 (Image Data Structure) --- diff --git a/mdsms.c b/mdsms.c index 686e402..c86f978 100644 --- a/mdsms.c +++ b/mdsms.c @@ -1430,7 +1430,7 @@ unsigned char binn[140]={ unsigned char header[]={ 0x30, /* version string '0' */ 0x02, /* item=OTA bitmap */ -#define PICTURE_BYTES (((PICTURE_WIDTH+7)/8)*PICTURE_HEIGHT) +#define PICTURE_BYTES ((PICTURE_WIDTH*PICTURE_HEIGHT+7)/8) #define PICTURE_BYTES_INCL_HEADER (PICTURE_BYTES +4/*header*/) PICTURE_BYTES_INCL_HEADER>>8,PICTURE_BYTES_INCL_HEADER&0xFF, /* picture size in bytes incl. header */ 0x00, /* animation pictures - 0=static picture */