Class JAIBMPWriter

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class JAIBMPWriter
    extends JAIWriter
    Write a javax.media.jai.RenderedOp to a specified BMP file.

    The file is specified by the fileName attribute using any form acceptable to FileParameter.

    If the storeTopDown parameter has value true, then the data will be stored from the top on down. Usually, bitmap files are stored from the bottom on up.

    If the confirmOverwrite parameter has value false, then this actor will overwrite the specified file if it exists without asking. If true (the default), then if the file exists, then this actor will ask for confirmation before overwriting.

    Since:
    Ptolemy II 3.0
    Version:
    $Id$
    Author:
    James Yeh, Christopher Hylands Brooks
    See Also:
    FileParameter
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Field Detail

      • storeTopDown

        public Parameter storeTopDown
        If true, then write the data in top to bottom order. If false (the default), then write the data in bottom to top order.
    • Method Detail

      • postfire

        public boolean postfire()
                         throws IllegalActionException
        Read an input JAIImageToken and write it to the file. If the file does not exist then create it. If the file already exists, then query the user for overwrite.
        Specified by:
        postfire in interface Executable
        Overrides:
        postfire in class JAIWriter
        Returns:
        True if the execution can continue.
        Throws:
        IllegalActionException - If the file cannot be opened or created, if the user refuses to overwrite an existing file, of if the image in unable to be encoded.