Package java.awt.image

Examples of java.awt.image.FilteredImageSource


        if ((hints & (SCALE_SMOOTH | SCALE_AREA_AVERAGING)) != 0) {
            filter = new AreaAveragingScaleFilter(width, height);
        } else {
            filter = new ReplicateScaleFilter(width, height);
        }
        ImageProducer producer = new FilteredImageSource(getSource(), filter);
        return Toolkit.getDefaultToolkit().createImage(producer);
    }
View Full Code Here


public class GrayFilter extends RGBImageFilter {
    private static final float INTERVAL_BOUND = 1f / 3;
   
    public static Image createDisabledImage(Image i) {
        FilteredImageSource fis = new FilteredImageSource(i.getSource(), new GrayFilter(true, 50));
        return Toolkit.getDefaultToolkit().createImage(fis);
    }
View Full Code Here

        if ((hints & (SCALE_SMOOTH | SCALE_AREA_AVERAGING)) != 0) {
            filter = new AreaAveragingScaleFilter(width, height);
        } else {
            filter = new ReplicateScaleFilter(width, height);
        }
        ImageProducer producer = new FilteredImageSource(getSource(), filter);
        return Toolkit.getDefaultToolkit().createImage(producer);
    }
View Full Code Here

public class GrayFilter extends RGBImageFilter {
    private static final float INTERVAL_BOUND = 1f / 3;
   
    public static Image createDisabledImage(Image i) {
        FilteredImageSource fis = new FilteredImageSource(i.getSource(), new GrayFilter(true, 50));
        return Toolkit.getDefaultToolkit().createImage(fis);
    }
View Full Code Here

        for (URL layer : layers) {
            // Image img = new ImageIcon(getResource(path)).getImage();
            Image img = Toolkit.getDefaultToolkit().createImage(layer);
            if (colorfilter != null) {
                img = Toolkit.getDefaultToolkit().createImage(
                        new FilteredImageSource(img.getSource(), colorfilter));
            }
            img = (new ImageIcon(img)).getImage(); // wait for load
            if (g == null) {
                result = UiUtils.newTransparentImage(img.getWidth(null),
                        img.getHeight(null));
View Full Code Here

    @Override
    public BufferedImage getSicknessImage() {
        if (imageSickness == null) {
            Image image = getImageFromResourceTransparent("/sickness.png", Color.WHITE, new Rectangle(296, 265));
            Toolkit tk = Toolkit.getDefaultToolkit();
            image = tk.createImage(new FilteredImageSource(image.getSource(), new CropImageFilter(0, 0, 200, 285)));
            imageSickness = BufferedImageBuilder.bufferImage(image, BufferedImage.TYPE_INT_ARGB);
        }
        return imageSickness;
    }
View Full Code Here

                    return rgb;
                }
            }
        };

        ImageProducer ip = new FilteredImageSource(im.getSource(), filter);
        return Toolkit.getDefaultToolkit().createImage(ip);
    }
View Full Code Here

   * @param filter  Description of Parameter
   * @param image   Description of Parameter
   * @return        Description of the Returned Value
   */
  public static Image filterImage(RGBImageFilter filter, Image image) {
    return producer.createImage(new FilteredImageSource(image.getSource(), filter));
  }
View Full Code Here

    ImageProducer producer = icon.getSource();

    // If direction is RTL, flip the source image
    if (_isRightToLeft(context))
      producer = new FilteredImageSource(producer, new MirrorImageFilter());

    Image flippedIcon =
      toolkit.createImage(producer);

    // Be sure that the image is fully loaded
View Full Code Here

    Image       baseImage,
    ImageFilter imageFilter
    )
  {
    // get the filtered image producer
    ImageProducer producer = new FilteredImageSource(baseImage.getSource(),
                                                     imageFilter);

    // return the filtered image
    return Toolkit.getDefaultToolkit().createImage(producer);
  }
View Full Code Here

TOP

Related Classes of java.awt.image.FilteredImageSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.