• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Appending multiple images into a tif file

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have seen VB, C# code to add JPGS to build a TIF file.

I need to know using any tool, tip , trick or a Java code inorder to build 4 JPEG images into one TIF file.
 
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A quick search finds http://stackoverflow.com/questions/6904752/write-tiled-output-of-tiff-using-imageio-in-java and http://lorddisk.wordpress.com/2011/05/14/write-multiple-images-tiff-file-jai-vs-imageio/. Both use the javax.imageio.ImageIO API, which can be TIFF-enabled as described in https://coderanch.com/t/445956/open-source/add-tiff-writer-imageio-package
 
Mohtashim Shaikh
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting the below error executing your code.



Below is how my code looks:



Any clues to fix this problem ? I am on windows XP
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You never registered the reader and writer as specified in the last link provided by Ulf.
 
Mohtashim Shaikh
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was happy with the code until this happened.

I have 15 JPG images having the combined file size of 4.3 MB.

When I create a .tiff file the .tiff size becomes approximately 52 MB when I wanted it to be around 4.3 MB.

Any reasons and workarounds to fix the issue ?
 
Mohtashim Shaikh
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mohtashim Shaikh wrote:I was happy with the code until this happened.

I have 15 JPG images having the combined file size of 4.3 MB.

When I create a .tiff file the .tiff size becomes approximately 52 MB when I wanted it to be around 4.3 MB.

Any reasons and workarounds to fix the issue ?



Should I open a new thread inorder to grab attention on this quote(query) ?
 
reply
    Bookmark Topic Watch Topic
  • New Topic