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

Seamless way of using image filters with multi-resolution images

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated: