This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#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);
#2
Posted
:
Tuesday, March 25, 2008 6:31:05 AM(UTC)
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.