Package java.awt.image

Examples of java.awt.image.ImageProducer


        this.bComplete = true;
        this.ip.removeConsumer(this);
      }
    } 
    
    ImageProducer ip = im.getSource();
    getImageData ic = new getImageData(ip);
    ip.startProduction(ic);
    while (!ic.getComplete()) {
      Thread.yield();
    }
    return ic.getRgbImage();
  }
View Full Code Here


        Image           image = null;
        URL           url;
        Toolkit           toolkit;
        Class           classObject;
        Object                 objImageProducer;
        ImageProducer         imageProducer;
        BufferedInputStream    streamImage;
        byte                   arrImageBytes [];

        toolkit = Toolkit.getDefaultToolkit ();
View Full Code Here

    SystemTray tray = SystemTray.getSystemTray();
    int w = 80;
    int[] pix = new int[w*w];
    for (int i=0; i< w*w; i++ )
      pix [i]=(int)(Math.random ()*255);
    ImageProducer producer = new MemoryImageSource ( w,w,pix,0,w );
    Image  image = Toolkit.getDefaultToolkit().createImage(producer);
    TrayIcon trayIcon = new TrayIcon(image);
    trayIcon.setImageAutoSize(true);
    startWindow();
    try
View Full Code Here

    /**
     * Creates an image from an existing one by replacing the old color with the new color.
     */
    public static Image createImage(Image i, Color oldColor, Color newColor) {
        MaskFilter filter = MaskFilter.getInstance(oldColor, newColor);
        ImageProducer prod = new FilteredImageSource(i.getSource(), filter);
        Image image = Toolkit.getDefaultToolkit().createImage(prod);
        return image;
    }
View Full Code Here

     * @param insets the insets. The border area with the insets will not be tinted.
     * @return a tinted image
     */
    public static Image createTintedImage(Image i, Color color, Insets insets) {
        TintFilter filter = new TintFilter(color, i.getWidth(null), i.getHeight(null), insets);
        ImageProducer prod = new FilteredImageSource(i.getSource(), filter);
        return Toolkit.getDefaultToolkit().createImage(prod);
    }
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

        Object urlContent = imageURL.getContent();

        // Sun VM's return ImageProducers
        if (urlContent instanceof ImageProducer)
        {
          ImageProducer producer = (ImageProducer) urlContent;

          outImage = Toolkit.getDefaultToolkit().createImage(producer);
        }
        // Microsoft VM's return Images
        else if (urlContent instanceof Image)
View Full Code Here

    // 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
    if (_isRightToLeft(context))
      producer = new FilteredImageSource(producer, new MirrorImageFilter());
View Full Code Here

      return null;
    }

    Toolkit toolkit = Toolkit.getDefaultToolkit();

    ImageProducer producer = icon.getSource();

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

    }

    protected void loadImage() throws FopImageException {
        int[] tmpMap = null;
        try {
            ImageProducer ip = (ImageProducer)this.m_href.getContent();
            FopImageConsumer consumer = new FopImageConsumer(ip);
            ip.startProduction(consumer);

            while (!consumer.isImageReady()) {
                Thread.sleep(500);
            }
            this.m_height = consumer.getHeight();
View Full Code Here

TOP

Related Classes of java.awt.image.ImageProducer

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.