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

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, September 24, 2009 11:30:32 AM(UTC)

grhind  
grhind

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
 

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 : Sunday, September 27, 2009 5:42:02 AM(UTC)

Adam Boulad  
Guest

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.

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