Compacts TIFF files with specific options.
public void CompactFile(
string srcFileName,
string destFileName,
int pages,
int srcStartPage,
bool useSrcIfd,
long srcIfd,
int destStartPage,
bool useDestIfd,
long destIfd,
CodecsSavePageMode pageMode,
bool noSubFileType,
bool motorolaOrder,
bool bigTiff
)
Public Overloads Sub CompactFile( _
ByVal srcFileName As String, _
ByVal destFileName As String, _
ByVal pages As Integer, _
ByVal srcStartPage As Integer, _
ByVal useSrcIfd As Boolean, _
ByVal srcIfd As Long, _
ByVal destStartPage As Integer, _
ByVal useDestIfd As Boolean, _
ByVal destIfd As Long, _
ByVal pageMode As CodecsSavePageMode, _
ByVal noSubFileType As Boolean, _
ByVal motorolaOrder As Boolean, _
ByVal bigTiff As Boolean _
)
- (BOOL)compactFile:(NSString *)srcFileName
destinationFile:(NSString *)destFileName
pages:(NSUInteger)pages
sourceStartPage:(NSInteger)srcStartPage
estinationStartPage:(NSInteger)destStartPage
useSourceIFD:(BOOL)useSrcIfd
sourceIFD:(NSInteger)srcIfd
useDestinationIFD:(BOOL)useDestIfd
destinationIFD:(NSInteger)destIfd
pageMode:(LTCodecsSavePageMode)pageMode
noSubFileType:(BOOL)noSubFileType
motorolaOrder:(BOOL)motorolaOrder
bigTiff:(BOOL)bigTiff
error:(NSError **)error
public void compactFile(String srcFileName, String destFileName, int pages, int srcStartPage, boolean useSrcIfd, long srcIfd, int destStartPage, boolean useDestIfd, long destIfd, CodecsSavePageMode pageMode, boolean noSubFileType, boolean motorolaOrder, boolean bigTiff)
public:
void CompactFile(
String^ srcFileName,
String^ destFileName,
int pages,
int srcStartPage,
bool useSrcIfd,
int64 srcIfd,
int destStartPage,
bool useDestIfd,
int64 destIfd,
CodecsSavePageMode pageMode,
bool noSubFileType,
bool motorolaOrder,
bool bigTiff
)
srcFileName
A String containing the name of the file being compacted. All the pages will be read from this file.
destFileName
A String containing the name of the file in which all the pages will be written.
pages
Value that represents the number of pages to copy. Use 0 to copy all the pages. If pages is > 0, only pages will be copied to destFileName.
srcStartPage
Specifies the start page in the source file. Page 1 is the first page, page 2 is the second page, etc. The pages will be read starting with this page.
useSrcIfd
true to use srcIfd as the file offset of the first page. false to use srcStartPage.
srcIfd
Offset into the source file for the start page. Used only if useSrcIfd is true.
All pages will be relative to that page. (Note that this might not be the first physical page in the file). This is a common technique for manipulating files with thousands of pages.
destStartPage
0 to overwrite destFileName. <>0 to append the pages to the end of the file.
useDestIfd
true to use destIfd as the file offset of the first page. false to use destStartPage.
destIfd
Offset into the destination file for the start page. Used only if useDestIfd is true.
All pages will be relative to that page. (Note that this might not be the first physical page in the file). This is a common technique for manipulating files with thousands of pages.
pageMode
Flag which indicates the save page mode.
Value | Meaning |
---|---|
CodecsSavePageMode.Insert | All pages are inserted before destStartPage. |
CodecsSavePageMode.Replace | Pages in destFileName are replaced beginning with destStartPage. |
noSubFileType
true to have the TGSUBFILETYPE tag stripped from all pages in the destination file.
motorolaOrder
true to save pages in Motorola byte order. false to save pages in Intel byte order. This only applies when creating a new file. When updating existing files, the byte order of the original file is used.
bigTiff
true to save TIFF files using the BigTiff format, which allows TIFF files to exceed 4GB.
This method can also be used to copy or extract one or more pages from a TIFF file and copy them without recompression to another TIFF file. Whenever you save an image containing a region as a TIFF file format, the region is also saved. Note, however, that the ability to save a region inside a TIFF file must be unlocked. This requires a Document Imaging or Medical Imaging toolkit.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document