problem with opening tiff file

R

ramsin.savra

Hi,

I'm using same code for opening a TIFF file in VC++ works just fine but
under linux it says unable to open the tiff file!
Any comment on this?


if (argc < 2)
{
cout << "Not enough parameter" << endl;
cout << "Usage: rst Tiff-Filename" << endl;
cout << endl;

return -1;
}

TIFF* pTifFile = TIFFOpen( argv[1], "r");


if (!pTifFile)
cout << "Unable to open " << argv[1] << " file." << endl;
else
{
cout << argv[1] << " opened sucessfully ..." << endl;

int dirCount = 0;

do
{
dirCount++;

} while(TIFFReadDirectory(pTifFile));

cout << argv[1] << "has " << dirCount << "directories insde" <<
endl;

TIFFClose(pTifFile);
}
 
J

Jay Nabonne

Hi,

I'm using same code for opening a TIFF file in VC++ works just fine but
under linux it says unable to open the tiff file!
Any comment on this?


if (argc < 2)
{
cout << "Not enough parameter" << endl;
cout << "Usage: rst Tiff-Filename" << endl;
cout << endl;

return -1;
}

TIFF* pTifFile = TIFFOpen( argv[1], "r");


if (!pTifFile)
cout << "Unable to open " << argv[1] << " file." << endl;
else
{

Based on your description and the code provided, I would guess that
TIFFOpen is returning 0.

Without seeing more code (e.g. the implementation of TIFFOpen),
it's impossible to say any more.

(Keep in mind that Linux is case-sensitive for filenames.)

- Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,663
Latest member
josh5959

Latest Threads

Top