Package java.awt.image

Examples of java.awt.image.ImageFilter


    public synchronized void addConsumer(ImageConsumer ic) {
  if (proxies == null) {
      proxies = new Hashtable();
  }
  if (!proxies.containsKey(ic)) {
      ImageFilter imgf = filter.getFilterInstance(ic);
      proxies.put(ic, imgf);
      src.addConsumer(imgf);
  }
    }
View Full Code Here


     *
     * @see ImageConsumer
     */
    public synchronized void removeConsumer(ImageConsumer ic) {
  if (proxies != null) {
      ImageFilter imgf = (ImageFilter) proxies.get(ic);
      if (imgf != null) {
    src.removeConsumer(imgf);
    proxies.remove(ic);
    if (proxies.isEmpty()) {
        proxies = null;
View Full Code Here

     */
    public void startProduction(ImageConsumer ic) {
  if (proxies == null) {
      proxies = new Hashtable();
  }
  ImageFilter imgf = (ImageFilter) proxies.get(ic);
  if (imgf == null) {
      imgf = filter.getFilterInstance(ic);
      proxies.put(ic, imgf);
  }
  src.startProduction(imgf);
View Full Code Here

     *
     * @see ImageConsumer
     */
    public void requestTopDownLeftRightResend(ImageConsumer ic) {
  if (proxies != null) {
      ImageFilter imgf = (ImageFilter) proxies.get(ic);
      if (imgf != null) {
    imgf.resendTopDownLeftRight(src);
      }
  }
    }
View Full Code Here

                    // use grey as an index into the colormap;
                    spectrogram.setRGB(i, maxYIndex - j, cmap.getColor(grey));
                }
            }

            ImageFilter scaleFilter =
                new ReplicateScaleFilter((int) (zoom * width), (int)(vzoom*height));
            scaledSpectrogram =
                createImage(new FilteredImageSource(spectrogram.getSource(),
                                                    scaleFilter));
            Dimension sz = getSize();
View Full Code Here

           
            // do the zooming
            width = (int) (zoom * width);
            height = (int)(vzoom*height);

            ImageFilter scaleFilter =
                new ReplicateScaleFilter(width, height);
            scaledSpectrogram =
                createImage(new FilteredImageSource(spectrogram.getSource(),
                                                    scaleFilter));

View Full Code Here

      return null;
    }

    // Get the colorizing filter
    int[] targetColors = _getTargetColors(requestedProperties);
    ImageFilter filter = new ColorizingFilter(_SOURCE_COLORS, targetColors);

    Toolkit toolkit = Toolkit.getDefaultToolkit();
    ImageProducer producer = icon.getSource();

    // If direction is RTL, flip the source image
View Full Code Here

                    // use grey as an index into the colormap;
                    spectrogram.setRGB(i, maxYIndex - j, cmap.getColor(grey));
                }
            }

            ImageFilter scaleFilter =
                new ReplicateScaleFilter((int) (zoom * width), (int)(vzoom*height));
            scaledSpectrogram =
                createImage(new FilteredImageSource(spectrogram.getSource(),
                                                    scaleFilter));
            Dimension sz = getSize();
View Full Code Here

           
            // do the zooming
            width = (int) (zoom * width);
            height = (int)(vzoom*height);

            ImageFilter scaleFilter =
                new ReplicateScaleFilter(width, height);
            scaledSpectrogram =
                createImage(new FilteredImageSource(spectrogram.getSource(),
                                                    scaleFilter));

View Full Code Here

    }

    public static java.awt.Image makeGrayTransparent(byte[] imageData) {
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        java.awt.Image img = toolkit.createImage(imageData);
        ImageFilter filter = new RGBImageFilter() {

                public final int filterRGB(int x, int y, int rgb)
                {
                    int r = (rgb & 0xFF0000) >> 16;
                    int g = (rgb & 0xFF00) >> 8;
View Full Code Here

TOP

Related Classes of java.awt.image.ImageFilter

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.