Thumbnail creation with small memory footprint.

Discussion in 'Java' started by gbrun, Feb 19, 2006.

  1. gbrun

    gbrun Guest

    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.
    gbrun, Feb 19, 2006
    #1
    1. Advertising

  2. > 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(8) so that only DC-coeffs are read (400x250)
    and
    2) set scaling options in ImageProducerAdapter:
    ImageProducerAdapter.setOptimizeScalingFor(ImageProducerAdapter.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
    Andrey Kuznetsov, Feb 19, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Francisco Garcia

    Small footprint XP app

    Francisco Garcia, Jan 9, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    609
    Shannon Broskie
    Feb 5, 2004
  2. David Lozzi
    Replies:
    1
    Views:
    488
    john smith
    Feb 1, 2006
  3. vahania

    small footprint soap

    vahania, Jun 26, 2003, in forum: XML
    Replies:
    1
    Views:
    988
    Heinz Häberle
    Jun 27, 2003
  4. nick
    Replies:
    58
    Views:
    1,898
    Bart van Ingen Schenau
    Mar 16, 2009
  5. Replies:
    9
    Views:
    139
    Brian McCauley
    Apr 1, 2005
Loading...

Share This Page