12-20-2015 05:12 AM
Hi,
I made a vi to read a tiff file as binary.
But I found that the total bytes read by my vi alwas lacks 15 bytes.
I have checked the total bytes with other binary editor (e.g. hex fiend and 0xOD).
Does anyone know why this issue happens?
I attached my vi and the tiff image I tried to read.
Solved! Go to Solution.
12-20-2015 06:03 AM
Xiang00 a écrit :
Hi,
I made a vi to read a tiff file as binary.
But I found that the total bytes read by my vi alwas lacks 15 bytes.
I have checked the total bytes with other binary editor (e.g. hex fiend and 0xOD).
Does anyone know why this issue happens?
I attached my vi and the tiff image I tried to read.
You have a tiff file you shouldn't read it as a text file to count the number of bytes. You are probably losing bytes in the conversion to ASCII). Use Get File Size.vi (from File I/O - Advanced File Functions palette) to get the total number of bytes or use Read From Binary File.vi (set the count input to -1 to read all bytes) and connect a U8 constant to the data type input to count the number of bytes as in the vi you posted (using array size).
Ben64
12-20-2015 06:48 AM
>Ben64
Thank you very much for your prompt reply. What you suggested solved my problem.