Interface JpegService


public interface JpegService
Service to convert a BufferedImage into JPEG image data.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    createJpeg(BufferedImage bufferedImage)
    Convert a buffered image into JPEG binary data.
    byte[]
    createJpeg(BufferedImage bufferedImage, int blockWidth, int blockHeight)
    Convert a buffered image into blocks of JPEG binary data.
    void
    createJpeg(BufferedImage bufferedImage, org.codice.imaging.nitf.core.image.ImageSegment chipImageSegment, boolean isBlocking, int blockWidth, int blockHeight)
    Encode a buffered image into binary data and set the appropriate fields in the image segment.
  • Method Details

    • createJpeg

      byte[] createJpeg(BufferedImage bufferedImage) throws IOException
      Convert a buffered image into JPEG binary data.
      Parameters:
      bufferedImage - must be non-null
      Returns:
      binary data
      Throws:
      IOException
    • createJpeg

      byte[] createJpeg(BufferedImage bufferedImage, int blockWidth, int blockHeight) throws IOException
      Convert a buffered image into blocks of JPEG binary data.
      Parameters:
      bufferedImage - must be non-null
      blockWidth - the block width
      blockHeight - the block height
      Returns:
      binary data
      Throws:
      IOException
    • createJpeg

      void createJpeg(BufferedImage bufferedImage, org.codice.imaging.nitf.core.image.ImageSegment chipImageSegment, boolean isBlocking, int blockWidth, int blockHeight) throws IOException
      Encode a buffered image into binary data and set the appropriate fields in the image segment.
      Parameters:
      bufferedImage - must be non-null
      chipImageSegment - must be non-null
      isBlocking - true if the imaging should be blocked
      blockWidth - the block width
      blockHeight - the block height
      Throws:
      IOException