Class DataInterpreterJpeg
- java.lang.Object
-
- org.apache.commons.imaging.formats.tiff.datareaders.DataInterpreterJpeg
-
final class DataInterpreterJpeg extends java.lang.ObjectProvides logic for obtaining image data from a JPEG-encoded TIFF strip or tile (the "block") from the source file.
-
-
Constructor Summary
Constructors Constructor Description DataInterpreterJpeg()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static voidintepretBlock(TiffDirectory directory, ImageBuilder workingBuilder, int xBlock, int yBlock, int blockWidth, int blockHeight, byte[] compressed)Interpret the content of a TIFF strip or tile obtained from the source file.
-
-
-
Method Detail
-
intepretBlock
static void intepretBlock(TiffDirectory directory, ImageBuilder workingBuilder, int xBlock, int yBlock, int blockWidth, int blockHeight, byte[] compressed) throws ImagingException, java.io.IOException
Interpret the content of a TIFF strip or tile obtained from the source file. The workingBuilder is an image builder that is configured to receive the extracted data.The dimensions of the workingBuilder may or may not be identical to those of the source image. If the calling module is extracting a partial image, the workingBuilder will be sized so that its upper-left corner coordinate (row and column) and width and height are all even multiples of the dimensions of the tile or strip definition from the source. The reason for that approach is to simplify some of the logic in the legacy code by eliminating bounds-checking in the transfer loops.
- Parameters:
directory- the source directory containing JPEG tablesworkingBuilder- the output image-builder to receive pixels.xBlock- column offset of the block within the workingBuilderyBlock- row offset of the block within the workingBuilderblockWidth- the width of the block (may be smaller than the full width of the JPEG image obtained from the source data)blockHeight- the height of the block (may be smaller than the full height of the JPEG image obtained from the source data)compressed- the raw bytes from the TIFF source file- Throws:
ImagingException- in the event of an unsupported feature or JPEG-specific encoding errorjava.io.IOException- in the event of an unrecoverable I/O error
-
-