Examples of asAWTImage()


Examples of ptolemy.data.ImageToken.asAWTImage()

    public void fire() throws IllegalActionException {
        super.fire();

        ParameterBlock parameters = new ParameterBlock();
        ImageToken imageToken = (ImageToken) input.get(0);
        Image awtImage = imageToken.asAWTImage();
        parameters.add(awtImage);

        RenderedOp jaiImage = JAI.create("awtImage", parameters);
        output.send(0, new JAIImageToken(jaiImage));
    }
View Full Code Here

Examples of ptolemy.data.ImageToken.asAWTImage()

    public void fire() throws IllegalActionException {
        super.fire();

        if (input.hasToken(0)) {
            ImageToken imageToken = (ImageToken) input.get(0);
            Image image = imageToken.asAWTImage();
            Buffer buffer = ImageToBuffer.createBuffer(image, _frameRate);
            output.send(0, new JMFImageToken(buffer));
        }
    }
View Full Code Here

Examples of ptolemy.data.ImageToken.asAWTImage()

        int rotation = ((IntToken) (rotationInDegrees.getToken())).intValue();

        for (int i = 0; i < width; i++) {
            if (input.hasToken(i)) {
                ImageToken imageToken = (ImageToken) input.get(i);
                Image image = imageToken.asAWTImage();
                Image rotatedImage = Transform.rotate(image, rotation);
                output.broadcast(new AWTImageToken(rotatedImage));
            }
        }
    }
View Full Code Here

Examples of ptolemy.data.ImageToken.asAWTImage()

        int width = input.getWidth();

        for (int i = 0; i < width; i++) {
            if (input.hasToken(i)) {
                ImageToken imageToken = (ImageToken) input.get(i);
                Image image = imageToken.asAWTImage();
                String description = "Image: " + image.getWidth(null) + " x "
                        + image.getHeight(null);
                Token out = new StringToken(description);
                output.broadcast(out);
            }
View Full Code Here

Examples of ptolemy.data.ImageToken.asAWTImage()

     @return True.
     */
    public boolean postfire() throws IllegalActionException {
        if (input.hasToken(0)) {
            ImageToken token = (ImageToken) input.get(0);
            Image value = token.asAWTImage();
            _icon.setImage(value);
        }

        return true;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.