Added additional resizeFast() method that works like resize() but uses a cheaper

resampling algoritm.
This commit is contained in:
hns 2003-01-29 16:16:21 +00:00
parent d93efaa377
commit af2a5e9793

View file

@ -94,12 +94,16 @@ public abstract class ImageWrapper {
}
public void resize (int w, int h) {
// ImageFilter filter = new ReplicateScaleFilter (w, h);
// img = Toolkit.getDefaultToolkit ().createImage(new FilteredImageSource(img.getSource(), filter));
img = img.getScaledInstance (w, h, Image.SCALE_SMOOTH);
width = w;
height = h;
}
public void resizeFast (int w, int h) {
img = img.getScaledInstance (w, h, Image.SCALE_FAST);
width = w;
height = h;
}
public abstract void reduceColors (int colors);