Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8152309

Seamless way of using image filters with multi-resolution images

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 9
    • client-libs
    • 2d

      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.

            prr Philip Race
            alexsch Alexandr Scherbatiy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: