Hi all, java.awt.Image.getScaledInstance is not completely implemented. The following two scale flag cases are not implemented: case SCALE_SMOOTH: case SCALE_AREA_AVERAGING: default: throw new Error("not implemented"); This is done quickly however the needed classes java/awt/image/ReplicateScaleFilter and java/awt/image/AreaAveragingScaleFilter are only stub classes. This causes the startup error for JUMP. A simple workaround is to use the other scale flag types until the classes are properly implemented: switch (flags) { case SCALE_DEFAULT: case SCALE_FAST: case SCALE_REPLICATE: case SCALE_SMOOTH: // FIXME Implement java/awt/image/ReplicateScaleFilter case SCALE_AREA_AVERAGING: // FIXME Implement java/awt/image/AreaAveragingScaleFilter ImageProducer producer = new FilteredImageSource(this.getSource(), new ReplicateScaleFilter(width, height)); return Toolkit.getDefaultToolkit().createImage(producer); } Wolfgang
ReplicateScaleFilter is now implemented, but AreaAveragingScaleFilter is still a stub. I suspect AreaAveragingScaleFilter should be used when the SCALE_SMOOTH flag is used. See also bug #24701 about the AreaAveragingScaleFilter stub.
Created attachment 11347 [details] Patch to make SCALE_SMOOTH the same as SCALE_AREA_AVERAGING. If SCALE_SMOOTH should be the same as SCALE_AREA_AVERAGING this patch should be applied to implement it.
Fixed.