AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2000.04.28 02:38 "VC++ Release build causes problems", by Peter Montgomery
2000.04.28 04:32 "Re: VC++ Release build causes problems", by Roy Darrall
2000.04.28 06:16 "VC++ Release build causes problems", by Peter Montgomery
2000.04.28 06:25 "VC++ Release build causes problems", by Peter Montgomery
2000.04.28 09:19 "VC++ Release build causes problems", by John Aldridge
2000.04.28 17:49 "Re: VC++ Release build causes problems", by Daniel McCoy
2000.04.29 00:27 "VC++ Release build causes problems", by Peter Montgomery
2000.04.28 17:27 "VC++ Release build causes problems", by Peter Montgomery
2000.04.28 18:33 "Re: VC++ Release build causes problems", by Jan Nijtmans
2000.04.28 20:39 "Re: VC++ Release build causes problems", by Daniel McCoy

2000.04.28 02:38 "VC++ Release build causes problems", by Peter Montgomery

Hi,

I just downloaded the 3.5.5 libtiff code, hoping it would solve a problem in the previous 3.4beta037 code I was using. It hasn't. The problem is that when I build the library for Win32 under VC++ as a debug build, the code behaves perfectly. However, when I create a release build, images come in that have color that looks like a B&W palleted image being viewed with a color palette. In other words, the colors are all screwy. Of course, not completely. Some of the colors are fine, and the most problematic colors seem to be very dark ones. I think, but have not been able to verify yet, that when a color channel is 0, the color is instead replaced with some sort of random, garbage number. It seems like some buffer is not being properly initialized and works in the debug build because the VC++ zeros all memory before use.

It's quite unlikely that the problem is in my code since all the other file formats I support work perfectly. I implemented TIFF support by using the same structure my other file formats use, but at the right time simply make a call to "TIFFReadScanline()" and then copy the results as needed. I also believe the problem may be limited to 4 channel RGBA images but work fine with 3 channel RGB images. Try loading the "Strike.tif" test image. When I do it under the debug build it works perfectly. With the release build, the background which should be black comes up pure white in most places and mult-colored at the transition to the bowling alley and pins.

Has anyone else encountered this? Is anyone else using VC++ with a release build and loading RGBA images?

    Thanks,
    PeterM