Removing the argument and error checking, the implementation of Combine looks like this: Atalasoft has added a utility method called Combine which will combine an arbitrary set of TIFF Streams into a single output stream. The simplicity and flexibility of this model is immediately apparent. In addition, we have a convenience constructor that lets you make an TiffPage object from an AtalaImage directly - note that this will make an in-memory copy of the image, allowing you to further manipulate or even dispose the original AtalaImage without affecting your TiffPage. To insert a page in a TiffDocument you can a TiffPage from any other TiffDocument’s Pages property. To remove the pages in a TiffDocument, you delete elements from the Pages property then call the Save method. To reorder the pages in a TiffDocument, you reorder the elements of the TiffPageCollection available through the Pages property then call the Save method. In testing with TIFF files composed of thousands of pages, we can populate the collection at a rate of only a few milliseconds per page. The actual image data is never needed so it is ignored. They are populated with information about the pages that you may care about, like page size, pixel format, and resolution. TiffPage objects are abstract representations of the actual pages. In construction, TiffDocument uses the stream to populate a TiffPageCollection with TiffPage objects, each of which represents a page within the TIFF file. The model works like this - a TiffDocument object is constructed from a stream (or a file name). In DotImage 6.0, we’ve added in three new classes that make high-level document manipulation trivial. In addition, you will be re-encoding your images and if they are compressed with a lossy compression scheme (like JPEG), the image quality will degrade. For example, if you read all the pages in for re-saving into another file, you risk running out of memory. While adding this functionality is possible with our existing classes, there are a number of gotchas, not the least of which is resource management. Our customers frequently want to do much more high-level operations on TIFF file elements, including merging files, reordering images within files, removing images and so on. Unfortunately, if you don’t understand how TIFF files are assembled, this code also allows you to create invalid or non-standard TIFF files. It is possible to do most anything to TIFF files, provided you know and understand how TIFF files are put together. Atalasoft has a full suite of tools for reading, creating and manipulating TIFF files in very minute detail. I need to periodically step back and shed my point of view and try to adopt the point of view of our customers. It’s a challenge as a core engineer and architect because I’ve had a specialized and very intimate view of our technologies. Create an Application to Split, Merge, and Reorder TIFFs in a Few Minutes – Source Code and EXE ProvidedĪt Atalasoft, we often look at imaging tasks that our customers are trying to perform and evaluate whether or not we are presenting them in the most straightforward way.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |