• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

combining tif files with java

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Beno�t
Thank you very much. Your example pointed me in
the right direction.
Chuck
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic