2

I'm trying to write a C program to run under Linux that includes reading and writing image files. All the image files I'll be dealing with are TIFF format bitonal images, at 1 bit per pixel. I've been quite surprised at the poor support for these sorts of images.

I've tried Imlib, but although it supposedly supports reading bitonal files, there is apparently no way to get access to the real image data -- it converts the data into RGB first, which is ridiculous especially at the resolutions I am working with.

I've tried FreeImage, which seemed a lot more sane in its API design than Imlib despite the incongruity of its Windowsy coding standards. Unfortunately, it doesn't actually seem to work with bitonal images; the data I'm getting is all zeroes, even when pretty much copying their sample code.

Any other possibilities? I just want something that will read and write bitonal TIFFs so I don't have to deal with the weird tagged format, compression, etc.

Chris
  • 21
  • 1

1 Answers1

0

The netpbm package (named as such in ubuntu at least) has a tifftopnm cmdline program as well as other tools. There is also a corresponding shared library that I guess can be used to do the same thing via function calls.

Also, as mentioned, libtiff can be used to extract metadata if you need.

I guess you're dealing with faxes huh.

Michael Slade
  • 13,802
  • 2
  • 39
  • 44