Java: Image IO, JAI

August 21st, 2009 by jeremychone

Docs

Sample code links:

  • The Perils of Image.getScaledInstance() (Best algorigthm to scale down/up images with ImageIO)
    • “… be aware that if you try to downscale an image by a factor of more than two (i.e., the scaled instance is less than half the size of the original), and you are using the BILINEAR or BICUBIC hint, the quality of the scaled instance may not be as smooth as you might like…. To combat this issue, you can use a multi-step approach when downscaling by more than two times; this helps prevent the information loss issue and produces a much higher quality result that is visually quite close to that produced by Image.SCALE_AREA_AVERAGING.”
  • JAI Tutorial (Sun)
  • Resizing with JAI
  • Resizing with JAI (Subsample for best result)

Other Samples

Leave a Reply