• 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

Query regarding JAI API for TIFF images.

 
Greenhorn
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.
 
Bartender
Posts: 4179
22
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic