AreaAveragingScaleFilter in Java

0
35
Spread the love
  • 14
  • 14
  • 25
  • 23
  •  
  •  
  •  
  • 12
  •  
  •  
    88
    Shares

AreaAveragingScaleFilter in Java
AreaAveragingScaleFilter in Java

AreaAveragingScaleFilter in Java:

AreaAveragingScaleFilter helps in scaling of an image to a specified pixels size. AreaAveragingScaleFilter also helps to communicate between image filter and the FilteredImageSource. To use this filter effectively, we can call Image.getScaledInstance() method with a hint constant.
AreaAveragingScaleFilter uses a scaling algorithm that averages the adjacent pixel values when shrinking or expanding an image. This algorithm produced a smooth scaled version of the image. However there is a super class of AreaAveragingScaleFilter called ReplicateScaleFilter uses a faster,no so smooth scaling algorithm.

The class Structure of AreaAveragingScaleFilter in Java is given as:


public class java.awt.image.AreaAveragingScaleFilter extends 
             java.awt.image.ReplicateScaleFilter{
//Constructor
public AreaAveragingScaleFilter(int width, int height);
//Methods
public void setHints(int hints);
public void setPixels(int x, int y, int w, int h, ColorModel model,
byte[] pixels, int off, int scansize);
public void setPixels(int x, int y, int w, int h, ColorModel model, int[]
pixels, int off, int scansize);
}
 
Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 14
  • 14
  • 25
  • 23
  •  
  •  
  •  
  • 12
  •  
  •  
    88
    Shares

LEAVE A REPLY

Please enter your comment!
Please enter your name here