I have an issue with CxImage 7.01 library in 64bit mode with a certain TIFF file with Jpeg compression causing a crash.

BUT compiled as 32bit it works fine! but I need it as 64bit for a called dll been called by a 64bit app.

So, is there any flags that can be unset in the compiler to compile more like 32bit mode?

The issue is described below runnin the demo app provided:-
Windows 7, 64bit. Visual Studio 2008 sp

Unhandled exception at 0x00000001401d726a in demod.exe: 0xC0000005: Access violation writing location 0x0000000405c6ab30.


tif_getimage.c

/*
* 8-bit packed YCbCr samples w/ 2,2 subsampling => RGB
*/

DECLAREContigPutFunc(putcontig8bitYCbCr22tile)
{
uint32* cp2;
(void) y;
fromskew = (fromskew / 2) * 6;
cp2 = cp+w+toskew;
while (h>=2) {
x = w;
while (x>=2) {
uint32 Cb = pp[4];
uint32 Cr = pp[5];
YCbCrtoRGB(cp[0], pp[0]); <--- ERRORS OUT HERE!