Problems with imaging (too slow or too much RAM)

S

SB

Hi all!

I have a problem with imaging in Java...
Basic situation is that I have to draw a map; This map is composed of
several "tiles" (which are just quadratic images) which are then, within the
Java program, composed into the map.
The tiles are, however, retrieved from a webserver, and to limit traffic I
want to cache them locally, so I first cached the BufferedImages, which
resulted in hundreds of megabytes of RAM consumption after panning for a
while (and especially zooming out).
So I thought to just cache the "raw image data" (i.e. the file contents) and
decode them, every time I draw, into a BufferedImage. This again was very
slow, as both TIFF and PNG images seem to be hard to decode, so every draw
operation needs seconds, which is just too slow.
So I thought to cache the image data in a somewhat compressed but fast to
decode format (Thought about what PCX uses, RLE it is called I think, where
there is a number which says how many pixels of this color follow, and then
the color).
The question is: How to do what I metioned above, with all those
ColorSpaces, ColorModels, WriteableRaster etc... will this gain me anything
(i.e. will it decode faster)? Is there any other way to easily accomplish
what I asked above?

Advice would be very welcome, as this really needs to be done...

kind regards,

Messi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top