aspose file tools*
The moose likes Java in General and the fly likes combining tif files with java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "combining tif files with java" Watch "combining tif files with java" New topic
Author

combining tif files with java

Chuck Cabrera
Greenhorn

Joined: Jan 20, 2002
Posts: 9
Hello
Does anyone know how to combine tif files using java (or any other tool). For example I have a CD where someone has scanned multiple page documents into a tif format. The users want the multiple page documents combined into 1 document.
Thanks
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Chuck,
You may use Java Advanced Imaging (JAI).
This API works well on most file formats, and handles correctly TIFF pages.
To do what you need, you may use the following snippet, assuming you want to save the output images as tiff:
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I forgot to mention that if you're using the Java 2 SDK 1.4, you may also use the ImageIO APIs.
To get the number of images use ImageReader.getNumImages and to retrieve one single image ImageReader.read(int imageIndex).
Hope this provides usefull.
Chuck Cabrera
Greenhorn

Joined: Jan 20, 2002
Posts: 9
Beno�t
Thank you very much. Your example pointed me in
the right direction.
Chuck
 
 
subject: combining tif files with java