• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

combining tif files with java

 
Chuck Cabrera
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beno�t
Thank you very much. Your example pointed me in
the right direction.
Chuck
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic