Class QualityThumbnail


  • public class QualityThumbnail
    extends com.idrsolutions.image.JDeliImage
    Class uses Lancsoz3 algorithm to generate good quality thumbnails or scaled images.

    Example:

    
     BufferedImage thumbnailImage = QualityThumbnail.getScaledImage(sourceImage,64,64);
     
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.image.BufferedImage getScaledImage​(java.awt.image.BufferedImage sourceImage, int expectedWidth, int expectedHeight)
      Generates a good quality thumbnail of an image
      • Methods inherited from class com.idrsolutions.image.JDeliImage

        optimiseImage
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QualityThumbnail

        public QualityThumbnail()
    • Method Detail

      • getScaledImage

        public static java.awt.image.BufferedImage getScaledImage​(java.awt.image.BufferedImage sourceImage,
                                                                  int expectedWidth,
                                                                  int expectedHeight)
        Generates a good quality thumbnail of an image
        Parameters:
        sourceImage - input image to scale
        expectedWidth - width you would like the output thumbnail to have
        expectedHeight - height you would like the output thumbnail to have
        Returns:
        thumbnail the generated thumbnail of the source image