473,322 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

problem with opening tiff file

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);
}

Jul 23 '05 #1
1 2151
On Wed, 06 Apr 2005 13:53:03 -0700, ramsin.savra wrote:
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

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
1
by: ashish | last post by:
We are working on development of an IFilter component for Jpeg and tiff files.First ever test resulted in following error. We are using ifilttst.exe(which comes with windows 2003 resource kit.) to...
0
by: whornak | last post by:
I am attempting to open a TIFF using Image.FromFile and keep getting the 'System.OutOfMemoryException' error. Help suggests that: "If the file does not have a valid image format or if GDI+ does...
4
by: Shumit Rehman | last post by:
Hi I have a table which has path names to photos I would like to view. I would like to open some/any kind of image viewer(Paint) to see the picture when I click the pathname. The pictures are...
0
by: Will Arrowsmith | last post by:
Hi All, I am trying to create a .tiff file to fax using the windows fax service FAXCOMLib. I have created an array of images (bitmaps) and converted them to 1pbb format in order to allow...
5
by: Eddie Leung | last post by:
Hi All, As I know that the tiff contain header information, I can use one software called tifftags.exe to get tiff tag information. However, I can't get any reference from vb.net to do such...
6
by: qysbc | last post by:
I have a web page and there is a link to open a TIFF file. The way I do it is to have the server code open a binary stream, set the content type to "image/tiff" and call Response.BinaryWrite. On...
6
by: sternr | last post by:
Hey, When I try to run the following code: System.Drawing.Image tiffImage = System.Drawing.Image.FromFile(@"C: \Image.tiff"); I get an "Out Of Memory" Exception. Does anybody know how...
3
by: =?Utf-8?B?dGtpZWhs?= | last post by:
I have large 1bpp tiff scans of arch. drawings that are typically 12032x16890 pixels (filesize is about a 1 meg +/-) While I can readily view smaller (dimension) files, when I try to do anything...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.