-
Enhancement
-
Resolution: Unresolved
-
P4
-
9
See the discussion: http://mail.openjdk.java.net/pipermail/2d-dev/2016-March/006453.html
The request is to use image filters with multi-resolution images to produce resulted multi-resolution images.
For example it would be good if code below works without changes for multi-resolution images:
---------------
124 static Image generateLightenedImage(final Image image, final int percent) {
125 final GrayFilter filter = new GrayFilter(true, percent);
126 final ImageProducer prod = new FilteredImageSource(image.getSource(), filter);
127 return Toolkit.getDefaultToolkit().createImage(prod);
128 }
---------------
Note 1:
MediaTracker is able to load resolution variants if they are provided from a set (like multiResoltuinImage.getResolutionVariants() method and not from method multiResoltuinImage.getResolutionVariant(width, height))
Note2:
The scheme multi-resolution image -> multi-resolution image producer + image filter -> multi-resolution image
should also provide information about resolution-variant scaling to the filter.
For example using CropImageFilter with given rectangle [x, y, width, height] in such case will result that from each resolution variant will be cut an constructed an image with the same size which is not what is expected.
The request is to use image filters with multi-resolution images to produce resulted multi-resolution images.
For example it would be good if code below works without changes for multi-resolution images:
---------------
124 static Image generateLightenedImage(final Image image, final int percent) {
125 final GrayFilter filter = new GrayFilter(true, percent);
126 final ImageProducer prod = new FilteredImageSource(image.getSource(), filter);
127 return Toolkit.getDefaultToolkit().createImage(prod);
128 }
---------------
Note 1:
MediaTracker is able to load resolution variants if they are provided from a set (like multiResoltuinImage.getResolutionVariants() method and not from method multiResoltuinImage.getResolutionVariant(width, height))
Note2:
The scheme multi-resolution image -> multi-resolution image producer + image filter -> multi-resolution image
should also provide information about resolution-variant scaling to the filter.
For example using CropImageFilter with given rectangle [x, y, width, height] in such case will result that from each resolution variant will be cut an constructed an image with the same size which is not what is expected.
- relates to
-
JDK-8151303 [macosx] [hidpi] JButton's low-res. icon is visible when clicking on it
- Resolved
-
JDK-8156149 Blurry rendering on Windows 7 at 125% screen setting
- Closed