wxImage - 2-color TIFFs are inverted on load

I have a series of scanned images in TIFF format with a color depth of 2. After loading any of them with img=wx.Image("xxxx.tif") and converting to wxBitmaps or saving to disk, the colors are inverted. The TIFF compression method doesn't appear to be a factor. Is there a known problem with handling 2-color TIFFs in wxPython? It works fine with 2-color BMPs, but I really need the TIFF support for compatibility with an established scanning pipeline.

TIA,
Roger H

···

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

How are the images scanned, i.e. what is producing them?

For bilevel images there will be the TIFF tag PhotometricInterpretation
(262) in the TIFF directory. The value of this tag will be set by then
entity that produced the image.

A value of 0 means WhiteIsZero. A value of 1 means BlackIsZero.

You may actually be seeing the image "correctly".

If you have access to utilities such as tiffdump or tiffinfo, then use
them on your images to check the value of this tag.

Depending on what you find, you may have to alter the image data
yourself.

···

On Thu, 2003-09-04 at 14:12, Roger Hyde wrote:

I have a series of scanned images in TIFF format with a color depth of 2.
After loading any of them with img=wx.Image("xxxx.tif") and converting to
wxBitmaps or saving to disk, the colors are inverted. The TIFF compression
method doesn't appear to be a factor. Is there a known problem with
handling 2-color TIFFs in wxPython? It works fine with 2-color BMPs, but I
really need the TIFF support for compatibility with an established scanning
pipeline.

TIA,
Roger H

--
Jim West
CheckLogix -a Concord company
102 S. Tejon Ste 920, Colorado Springs, CO 80903
719.633.7005 x223 Fax: 719.633.7006 Cell: 719.660.5676