--- old/src/java.desktop/share/classes/java/awt/image/CropImageFilter.java 2016-04-05 17:09:43.000000000 +0400 +++ new/src/java.desktop/share/classes/java/awt/image/CropImageFilter.java 2016-04-05 17:09:42.000000000 +0400 @@ -65,6 +65,17 @@ cropH = h; } + @Override + public ImageFilter getScaledFilterInstance(double scaleX, double scaleY) { + Object instance = super.getScaledFilterInstance(scaleX, scaleY); + CropImageFilter filter = (CropImageFilter) instance; + filter.cropX = (int) Math.ceil(cropX * scaleX); + filter.cropY = (int) Math.ceil(cropY * scaleY); + filter.cropW = (int) Math.floor(cropW * scaleX); + filter.cropH = (int) Math.floor(cropH * scaleY); + return filter; + } + /** * Passes along the properties from the source object after adding a * property indicating the cropped region.