org.apache.fop.afp.modca

## Class ImageObject

- java.lang.Object
- - org.apache.fop.afp.modca.AbstractAFPObject
  - - org.apache.fop.afp.modca.AbstractStructuredObject
    - - org.apache.fop.afp.modca.AbstractTripletStructuredObject
      - - org.apache.fop.afp.modca.AbstractNamedAFPObject
        - - org.apache.fop.afp.modca.AbstractDataObject
          - - org.apache.fop.afp.modca.ImageObject

- All Implemented Interfaces:
    Completable, Startable, Streamable

      public class ImageObject
      extends AbstractDataObject

  An IOCA Image Data Object

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.fop.afp.modca.AbstractAFPObject

      `AbstractAFPObject.Category, AbstractAFPObject.Type`

  - ### Field Summary

    - ### Fields inherited from class org.apache.fop.afp.modca.AbstractDataObject

      `factory, objectEnvironmentGroup`

    - ### Fields inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject

      `name`

    - ### Fields inherited from class org.apache.fop.afp.modca.AbstractTripletStructuredObject

      `triplets`

    - ### Fields inherited from class org.apache.fop.afp.modca.AbstractAFPObject

      `LOG, SF_CLASS, SF_HEADER_LENGTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImageObject(Factory factory, java.lang.String name)` Constructor for the image object with the specified name, the name must be a fixed length of eight characters.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `ImageSegment` | `getImageSegment()` Returns the image segment object associated with this image object.
    `void` | `setCompression(byte compression)` Sets the image compression.
    `void` | `setData(byte[] imageData)` Set the data of the image.
    `void` | `setEncoding(byte encoding)` Sets the image encoding.
    `void` | `setIDEColorModel(byte colorModel)` Deprecated. Use `IDEStructureParameter.setColorModel(byte)` instead.
    `void` | `setIDESize(byte size)` Sets the image IDE size.
    `void` | `setSubtractive(boolean subtractive)` Deprecated. Use `IDEStructureParameter.setSubtractive(boolean)` instead.
    `void` | `setViewport(AFPDataObjectInfo dataObjectInfo)` Sets the object view port (area position and size).
    `protected void` | `writeContent(java.io.OutputStream os)` Helper method to write the contents of the Object.
    `protected void` | `writeEnd(java.io.OutputStream os)` Helper method to write the end of the Object.
    `protected void` | `writeStart(java.io.OutputStream os)` Helper method to write the start of the Object.

    - ### Methods inherited from class org.apache.fop.afp.modca.AbstractDataObject

      `getObjectEnvironmentGroup, isComplete, isStarted, setComplete, setStarted`

    - ### Methods inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject

      `copySF, getName, getNameBytes, getNameLength, setName, toString`

    - ### Methods inherited from class org.apache.fop.afp.modca.AbstractTripletStructuredObject

      `addTriplet, addTriplets, getFullyQualifiedName, getTripletDataLength, getTriplets, hasTriplet, hasTriplets, setComment, setFullyQualifiedName, setFullyQualifiedName, setObjectClassification, writeTriplets`

    - ### Methods inherited from class org.apache.fop.afp.modca.AbstractStructuredObject

      `writeToStream`

    - ### Methods inherited from class org.apache.fop.afp.modca.AbstractAFPObject

      `copySF, truncate, writeChunksToStream, writeObjects`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ImageObject

          public ImageObject(Factory factory,
                             java.lang.String name)

      Constructor for the image object with the specified name, the name must be a fixed length of eight characters.
      Parameters:
        `name` - The name of the image.
        `factory` - the resource manager

  - ### Method Detail

    - #### getImageSegment

          public ImageSegment getImageSegment()

      Returns the image segment object associated with this image object.
      Returns:
        the image segment

    - #### setViewport

          public void setViewport(AFPDataObjectInfo dataObjectInfo)

      Sets the object view port (area position and size).
      Overrides:
        `setViewport` in class `AbstractDataObject`
      Parameters:
        `dataObjectInfo` - the object area info

    - #### setEncoding

          public void setEncoding(byte encoding)

      Sets the image encoding.
      Parameters:
        `encoding` - The image encoding.

    - #### setCompression

          public void setCompression(byte compression)

      Sets the image compression.
      Parameters:
        `compression` - The image compression.

    - #### setIDESize

          public void setIDESize(byte size)

      Sets the image IDE size.
      Parameters:
        `size` - The IDE size.

    - #### setIDEColorModel

          public void setIDEColorModel(byte colorModel)

      Deprecated. Use `IDEStructureParameter.setColorModel(byte)` instead.
      Sets the image IDE color model.
      Parameters:
        `colorModel` - the IDE color model.

    - #### setSubtractive

          public void setSubtractive(boolean subtractive)

      Deprecated. Use `IDEStructureParameter.setSubtractive(boolean)` instead.
      Set either additive or subtractive mode (used for ASFLAG).
      Parameters:
        `subtractive` - true for subtractive mode, false for additive mode

    - #### setData

          public void setData(byte[] imageData)

      Set the data of the image.
      Parameters:
        `imageData` - the image data

    - #### writeStart

          protected void writeStart(java.io.OutputStream os)
                             throws java.io.IOException

      Helper method to write the start of the Object.
      Overrides:
        `writeStart` in class `AbstractDataObject`
      Parameters:
        `os` - The stream to write to
      Throws:
        `java.io.IOException` - throws an I/O exception if one occurred

    - #### writeContent

          protected void writeContent(java.io.OutputStream os)
                               throws java.io.IOException

      Helper method to write the contents of the Object.
      Overrides:
        `writeContent` in class `AbstractDataObject`
      Parameters:
        `os` - The stream to write to
      Throws:
        `java.io.IOException` - throws an I/O exception if one occurred

    - #### writeEnd

          protected void writeEnd(java.io.OutputStream os)
                           throws java.io.IOException

      Helper method to write the end of the Object.
      Overrides:
        `writeEnd` in class `AbstractStructuredObject`
      Parameters:
        `os` - The stream to write to
      Throws:
        `java.io.IOException` - an I/O exception if one occurred

Copyright 1999-2022 The Apache Software Foundation. All Rights Reserved.