> My aim is to generate a thumbnail image (80x80 jpeg)
> from a source image that can have a HUGE resolution (more than 3200x2000).
>
> But all the API that i found use a unpacked memory version of the source
> image
> that of course can't be allocated, so i got a "out of memory".
>
> Does anyone know an API or method to scale down an image
> with small memory footprint by generating the result image in a flow ?
>
> i m using 1.4.2 JDK on AIX.
>
> thanks in advance.
with Imagero Reader you can minimize memory footpring with following:
1) JpegReader.setSubsampling(

so that only DC-coeffs are read (400x250)
and
2) set scaling options in ImageProducerAdapter:
ImageProducerAdapter.setOptimizeScalingFor(ImagePr oducerAdapter.OPTIMIZE_SCALING_MEMORY);
so that only amount of input rows needed to get one output row are held in
memory
(with subsampling 8 - only 4 rows, without subsampling 25 rows).
Note that Imagero's scaling is good for following scale factors: 2.0, 1.0
(if you need to antialias your picture), 0.5, 0.25, 0.125 and so on, for
other scale factors I recommend to combine subsampling with
AreaAveragingScaleFilter
see
http://reader.imagero.com for more info
--
Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities