Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, March 19, 2008 9:45:15 AM(UTC)

Groups: Registered
Posts: 32

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

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, March 25, 2008 6:31:05 AM(UTC)

Yasir Alani  

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

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.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.051 seconds.