LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview libtiff implementation

Oooops!!!

 

it seems I uploaded the wrong file!

 

Here they are.

 

Nico

 

 

 

 

Message 11 of 115
(5,434 Views)

Nico,

 

I downloaded the llb and tiff for windows from http://gnuwin32.sourceforge.net/packages/tiff.htmt. I got the following error message when I tried to run libtiff_example2.vi.

 

Error 1097 occurred at Call Library Function Node in libtiff2_writeScanLine_U8.vi

Possible reason(s):

LabVIEW:  An exception occurred within the external code called by a Call Library Function Node. The exception might have corrupted the LabVIEW memory. Save any work to a new location and restart LabVIEW.

 

Do you have any idea how I can solve the problem? Thanks.

 

Jin

0 Kudos
Message 12 of 115
(5,361 Views)

Mmm... could you tell where is the error generated in "libtiff2_writeScanLine_U8.vi"? All the "status" numeric outputs ("status_width", status_length" etc.) should be "1".

Do you get the same error by selecting "U16 ScanLine single page"? What about choosing a different tiff format ("U8 striped single page")?

 

N

0 Kudos
Message 13 of 115
(5,342 Views)

The error is generated in call function TIFFSetField( ). The error persisted when I selected "U16 ScanLine single page" or "U8 striped single page". I have no problem to run example 1.

0 Kudos
Message 14 of 115
(5,333 Views)

That's strange: could you please tell me which instance of TiffSetField() fails? There are many nodes calling TiffSetField() setting different tags (e. g. the first one to be called in "libtiff2_writeScanLine_U8.vi" set the tag 256, corresponding to ImageWidth).

Do you get the same error by choosing a multipaged file (choosing "U8 ScanLine multi page" in "libtiff_example2.vi")?

 

Anyone else having the same problem?

 

N

0 Kudos
Message 15 of 115
(5,329 Views)

N,

 

It is the first TiffSetField function with tag 256 caused the problem. It might relates with the version of the Tiff library. I downloaded the latest version 3.8.2. Which verison are you using?

0 Kudos
Message 16 of 115
(5,315 Views)

I am using 3.8.2, too... which value are you using as X resolution in "libtiff_example2.vi"? The default should be 300.

 

Could you please try and run "libtiff_example3.vi" (you will need also "libtiff2_DoTestImg.vi")? Both VIs are attached. Alternatively, try to create a single paged U8 tiff image using a program of your choice, then run "libtiff_test1.vi". The VI will ask you to choose a file for opening (select the file you created), then it will prompt you to choose a DIFFERENT name for saving it using libtiff.

 

Could you also right click on the node calling the TiffSetField function, choose "configure" and verify that it is pointing to the right libtiff3.dll file?

 

Hope it will help!

 

Nico

0 Kudos
Message 17 of 115
(5,309 Views)

Yes, X resolution is 300.

 

I tried both libtiff_exmaple3.vi and libtiff_test1.vi, both works well.

 

The library name and path for TiffSetField function is 'C:\Program Files\GnuWin32\bin\libtiff3.dll'.

 

Could you please tell me why libtiff_example2.vi didn't work while libtiff_exmaple3.vi works on my computer? Thanks.

0 Kudos
Message 18 of 115
(5,305 Views)

That's strange, I don't think there are big differences between the two examples... did you try to reinstall libtiff2? Maybe something got corrupted during the download... Anyway good that the new VIs work well!

 

Please let me know if you have further problems

 

Nico

 

 

0 Kudos
Message 19 of 115
(5,298 Views)

Nico,

 

One more question. What is the difference between writeScanLine and writeStripedPage? 

0 Kudos
Message 20 of 115
(5,288 Views)