Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: LT 15 - L_SaveFileOffset - TIFLZW
Started by tteveris@gspinc.com at 03-19-2008 14:50. Topic has 1 replies.

Print Search « Previous Thread Next Thread »
  03-19-2008, 14:50
tteveris@gspinc.com is not online. Last active: 2/11/2008 3:49:45 PM tteveris@gspinc.com

Top 50 Posts
Joined on 12-03-2003
Posts 48
LT 15 - L_SaveFileOffset - TIFLZW
Reply Quote
FYI - working with this function and format I found that the file position is NOT at the end of the file like I would think. I found I had to use the following to insure that the file position was at the end.

liDistanceToMove.QuadPart = 0;
liCurrentPosition.QuadPart = 0;
liCurrentPosition.LowPart = SetFilePointer(hOutFile, liDistanceToMove.LowPart, &liDistanceToMove.HighPart, FILE_END);
   Report 
  03-25-2008, 11:36
Yasir Alani is not online. Last active: 9/2/2008 12:40:05 PM Yasir Alani



Top 25 Posts
Joined on 02-05-2007
Posts 204
Re: LT 15 - L_SaveFileOffset - TIFLZW
Reply Quote

Thanks for the tip. I tested and you are right. Saving in some formats like BMP will set the file pointer to the end, while in others like TIFLZW, it will be left somewhere near the beginning (but not the very first byte). I think this depends on how the file format encoder writes the data. Probably with TIFLZW, the encoder needs to update the TIFF header after it finishes compressing the data, while in BMP, the header is written at the beginning.

 

In all cases, you should always set the seek position explicitly to ensure your program behaves correctly, which is what you're doing now.


Yasir Alani
LEADTOOLS Technical Support
   Report 
Post
LEAD Support Fo... » Developer » File Formats » Re: LT 15 - L_SaveFileOffset - TIFLZW

Powered by Community Server, by Telligent Systems