Re: [fpc-pascal] BLOCKWRITE-restrictions in writing .bmp-file?

Пётр Косаревский ppkk at mail.ru
Wed Sep 17 20:12:27 CEST 2008


>       IF (((NDum    ) MOD 4)<>0) THEN
> BLOCKWRITE(OutFile,Pixel,SIZEOF(Pixel));
>       IF (((NDum + 1) MOD 4)<>0) THEN
> BLOCKWRITE(OutFile,Pixel,SIZEOF(Pixel));
>       IF (((NDum + 2) MOD 4)<>0) THEN
> BLOCKWRITE(OutFile,Pixel,SIZEOF(Pixel));

1. If NDum = 4k (e.g. 12=4*3), you write two times; if NDum = 4k + 3 (e.g. 15=5*3), you write two times. It's not right.

2. Check sizeof-s. Are you sure they are one byte each? 

3. Are you sure the code worked good before?



More information about the fpc-pascal mailing list