Class RLEEncoder

java.lang.Object
com.twelvemonkeys.imageio.plugins.tga.RLEEncoder
All Implemented Interfaces:
Encoder

final class RLEEncoder extends Object implements Encoder
  • Field Details

    • pixelSize

      private final int pixelSize
  • Constructor Details

    • RLEEncoder

      RLEEncoder(int pixelDepth)
  • Method Details

    • encode

      public void encode(OutputStream stream, ByteBuffer buffer) throws IOException
      Description copied from interface: Encoder
      Encodes up to buffer.remaining() bytes into the given input stream, from the given buffer.
      Specified by:
      encode in interface Encoder
      Parameters:
      stream - the output stream to encode data to
      buffer - buffer to read data from
      Throws:
      IOException - if an I/O error occurs
    • encode

      private void encode(OutputStream stream, byte[] buffer, int pOffset, int length) throws IOException
      Throws:
      IOException
    • equalPixel

      private boolean equalPixel(byte[] buffer, int offset, int compareOffset)