Class PNMImageWriteParam


  • public class PNMImageWriteParam
    extends javax.imageio.ImageWriteParam
    A subclass of ImageWriteParam for writing images in the PNM format.

    This class allows for the specification of whether to write in the ASCII or raw variants of the PBM, PGM, and PPM formats; by default, the raw variant is used.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean raw  
      • Fields inherited from class javax.imageio.ImageWriteParam

        canOffsetTiles, canWriteCompressed, canWriteProgressive, canWriteTiles, compressionMode, compressionQuality, compressionType, compressionTypes, locale, MODE_COPY_FROM_METADATA, MODE_DEFAULT, MODE_DISABLED, MODE_EXPLICIT, preferredTileSizes, progressiveMode, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, tilingMode, tilingSet
      • Fields inherited from class javax.imageio.IIOParam

        controller, defaultController, destinationOffset, destinationType, sourceBands, sourceRegion, sourceXSubsampling, sourceYSubsampling, subsamplingXOffset, subsamplingYOffset
    • Constructor Summary

      Constructors 
      Constructor Description
      PNMImageWriteParam()
      Constructs a PNMImageWriteParam object with default values for parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getRaw()
      Returns the value of the raw parameter.
      void setRaw​(boolean raw)
      Sets the representation to be used.
      • Methods inherited from class javax.imageio.ImageWriteParam

        canOffsetTiles, canWriteCompressed, canWriteProgressive, canWriteTiles, getBitRate, getCompressionMode, getCompressionQuality, getCompressionQualityDescriptions, getCompressionQualityValues, getCompressionType, getCompressionTypes, getLocale, getLocalizedCompressionTypeName, getPreferredTileSizes, getProgressiveMode, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getTilingMode, isCompressionLossless, setCompressionMode, setCompressionQuality, setCompressionType, setProgressiveMode, setTiling, setTilingMode, unsetCompression, unsetTiling
      • Methods inherited from class javax.imageio.IIOParam

        activateController, getController, getDefaultController, getDestinationOffset, getDestinationType, getSourceBands, getSourceRegion, getSourceXSubsampling, getSourceYSubsampling, getSubsamplingXOffset, getSubsamplingYOffset, hasController, setController, setDestinationOffset, setDestinationType, setSourceBands, setSourceRegion, setSourceSubsampling
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • raw

        private boolean raw
    • Constructor Detail

      • PNMImageWriteParam

        public PNMImageWriteParam()
        Constructs a PNMImageWriteParam object with default values for parameters.
    • Method Detail

      • setRaw

        public void setRaw​(boolean raw)
        Sets the representation to be used. If the raw parameter is true, the raw representation will be used; otherwise the ASCII representation will be used.
        Parameters:
        raw - true if raw format is to be used.
        See Also:
        getRaw()
      • getRaw

        public boolean getRaw()
        Returns the value of the raw parameter. The default value is true.
        Returns:
        whether the data are written in raw representation.
        See Also:
        setRaw(boolean)