pdfimages -png and -tiff give inverted colour output
Please download the attachment which is just the first page from https://archive.org/details/wg224 (to avoid huge download). This contains black text on white background.
Run the commands:
pdfimages -png p.pdf q
pdfimages -tiff p.pdf r
pdfimages -all p.pdf s
fax2tiff -o s-000.tif $(< s-000.params) s-000.ccitt
We can see that the files q-000.png and r-000.tif display the colours inverted ie white text on black background whereas going to CCITT and then to TIF gives the correct output.
Please look into this and fix it. Thank you!
Attachment: p.pdf