I've been looking at adding some support for bilevel (black & white) TIFF images.
I seem to have something working for uncompressed images, but I'm almost sure that this: procedure TFPReaderTiff.ReadImgValue(BitCount: Word; var Run: Pointer; x: dword; Predictor: word; var LastValue: word; out Value: Word); inline; var BitNumber: byte; begin ... //Get the value of the right bit depending on x value // and scale it to dword: either $ffff or $0000 BitNumber:=7-(x mod 8); //Leftmost pixel starts with bit 7 Value:=$ffff* ((PCUInt8(Run)^) and (1 shl BitNumber) shr BitNumber); can be rewritten so it is faster. Any suggestions? Thanks, Reinier _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal