RE: [JAI] Improving speed of scaling (was Re: GIF image corrupt and Re: why is my performance...)
> Hi Mike,
> Thanks a bunch for this good explanation of what is
> happening. But if I
> have this large, untiled* TIFF image
> on a server and I get numerous requests to "see" parts of it in a
> browser, what is the best way to serve these
> sub-images - maybe I'm doing it wrong by using the crop and scale
> operations (and trying to keep original
> image in memory)?
it sounds like you're doing the right thing in principle. keep in
mind that each operator can have a tile cache associated with it,
and this is generally the mechanism for keeping things "in memory".
you may need to tweak the tile cache to manage exactly what you do
and don't want kept in memory.
> You mentioned re-tiling the image. Are you
> suggesting that retiling the untiled image and
> saving that retiled image in memory (or writing it to disk and let
> subsequent requests read the retiled image)
> might speed things up?
Yes on both counts. if you have enough memory to keep the entire
image in the heap, then go ahead and do it. or, if you have enough
memory to bring the image into the heap but can't KEEP it around,
then write it to a temp file and reread that for the actual viewing.
> -------------------------------TIFF image info for one of my images
> * Below is the output of a tiff viewer (sorry, I couldn't get
> to work on my XP box), but it seems
> to indicate a non-tiled image.)
yes, it looks untiled to me. oh well.