• 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

how to load compressed tiff image formats with JIMI

 
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this method


returns incorrect Image width & height (-1) for TIFF compressed formats.
when i try this code with jpg or tiff images that are not using compression;it just works fine.
but when i use a tiff file with lzw compression the jimi code for image loading is returning -1 for image width & height .why ?

is there any jimi example showing how to properly load the tiff compressed image ?

thanks.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JIMI does not support all kinds of compressed TIFFs.

This plugin for the javax.imageio.ImageIO class supports compressed TIFFs.
[ May 07, 2007: Message edited by: Ulf Dittmer ]
 
Yahya Elyasse
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for replying

is this plugin part of jimi or is it plugin for another product ?

is it possible to extend jimi to support compressed tiff ?
my customer don't want to make the risk of moving from jimi to another Image library as this will delay our project.

i would appreciate some help on this.

thanks.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's not a plugin for JIMI, it's a plugin for ImageIO (which is part of the JRE).

Sun doesn't make the JIMI source code available, so it's not easy to extend it. You can probably rip out the TIFF code form that plugin and put JIMI interfaces on top of it, though, if you need it badly.

But, as the page I linked to mentions, JIMI is substantially an 8-bit library, which limits its usefulness for many applications. I'd advise to consider moving away from it.
[ May 08, 2007: Message edited by: Ulf Dittmer ]
 
Yahya Elyasse
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for clarifications.

can you please show me a simple code on how to use above plugin to load tiff lzw compressed images ? or may be point me to where i can find such sample codes.

thanks.
 
Yahya Elyasse
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm considering moving to JAI (java advanced imaging).

is it a good choice ? do you have an Idea if JAI supports tiff compressed imgs loading ?

thanks.
 
Yahya Elyasse
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm considering moving to JAI (java advanced imaging).

is it a good choice ? do you have an Idea if JAI supports tiff compressed images loading ?

thanks.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My impression is that JAI is dead for all practical purposes. It does what it does, but it's not likely to do much more in the future. I wouldn't advise anybody to move towards it.
[ May 08, 2007: Message edited by: Ulf Dittmer ]
 
Yahya Elyasse
Ranch Hand
Posts: 510
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks anyway ulf.
can i ask this further question ?

this method converts Image to BufferedImage.


it works good for image files that aren't compressed.
however when i try it with a compressed 8MB tiff file it throws the following exception:


what could be the problem ?

how can i write a robust tobufferedImage() method that supports tiff compressed files?

thanks.
 
Every plan is a little cooler if you have a blimp. And a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic