This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, September 24, 2009 11:30:32 AM(UTC)
Groups: Registered
Posts: 19
I'm using release 16.5.
when using this code:
_Codecs.Save(_viewer.Image, LocalFilePath, RasterImageFormat.TifLzw, 0, 1, 1, iListIndex + 1, CodecsSavePageMode.Replace )
and lets say i use it 4 or 5 times without actually changing anything with _viewer.Image , my resulting file (tif) for each save keeps getting bigger and bigger. Becuase i'm using the Replace option my assumption is that it would actually replace what is there... By all rights it is working and it is replacing that one page but why does my file keep growing in size?
I used _Codecs.CompactFile(LocalFilePath, ToFilePath, 0) and it shrunk it back to the correct size but it slows the program down because i have to compact to one file path and then back to the original file path. Is there something wrong with the codecs.save? or something else you can suggest.
thanks
#2
Posted
:
Sunday, September 27, 2009 5:42:02 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
The CodecsSavePageMode.Replace option will flag the page as deleted without actually deleting it. If you want to replace the entire file, you can use the CodecsSavePageMode.Overwrite option or just use the CompactFile to compact and clean the file from the deleted pages.
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.