• 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Query regarding JAI API for TIFF images.

Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have programmed a multiple JPGs to TIFF converter program in Java using JAI api.

The concern is that I have 17 JPEG images with the total size(sum of all image sizes) of 4.5 MBs.

However, the TIFF file generated has a file size of 52 MB.

I would like the TIFF file to be 4.5 MBs.

Please let me know if this is a known issue and if there is any workaround to reducing the size.
Posts: 4179
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you setting the compression for the TIFF image? If not, you should set it to the JPEG compression type. Then you have to play with the quality value to get the same compression size as the source images. What would be happening by default is the JPEG image is read and decompressed, then the decompressed data is stored in TIFF format - which is why it would be larger. You need to tell JAI to do compression. Afterwards the TIFF files will probably be a bit larger than the source because there is a certain amount of overhead involved in the TIFF format, but I wouldn't expect it to be much larger.
Yeah, but does being a ninja come with a dental plan? And what about this tiny ad?
Garden Master Course kickstarter
    Bookmark Topic Watch Topic
  • New Topic