> 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? _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal