Class JpegDecoder

    • Field Detail

      • BAND_MASK_ARGB

        private static final int[] BAND_MASK_ARGB
      • BAND_MASK_RGB

        private static final int[] BAND_MASK_RGB
      • scaledQuantizationTables

        private final float[][] scaledQuantizationTables
      • image

        private java.awt.image.BufferedImage image
      • ioException

        private java.io.IOException ioException
      • zz

        private final int[] zz
      • blockInt

        private final int[] blockInt
      • block

        private final float[] block
      • useTiffRgb

        private boolean useTiffRgb
    • Constructor Detail

      • JpegDecoder

        public JpegDecoder()
        Constructs a new instance with the default, big-endian, byte order.
    • Method Detail

      • fastRound

        private static int fastRound​(float x)
      • getIntervalStartPositions

        static java.util.List<java.lang.Integer> getIntervalStartPositions​(int[] scanPayload)
        Returns the positions of where each interval in the provided array starts. The number of start positions is also the count of intervals while the number of restart markers found is equal to the number of start positions minus one (because restart markers are between intervals).
        Parameters:
        scanPayload - array to examine
        Returns:
        the start positions
      • splitByRstMarkers

        static JpegInputStream[] splitByRstMarkers​(int[] scanPayload)
        Returns an array of JpegInputStream where each field contains the JpegInputStream for one interval.
        Parameters:
        scanPayload - array to read intervals from
        Returns:
        JpegInputStreams for all intervals, at least one stream is always provided
      • extend

        private int extend​(int v,
                           int t)
      • rescaleMcu

        private void rescaleMcu​(Block[] dataUnits,
                                int hSize,
                                int vSize,
                                Block[] ret)
      • setTiffRgb

        public void setTiffRgb()
        Sets the decoder to treat incoming data as using the RGB color model. This extension to the JPEG specification is intended to support TIFF files that use JPEG compression.
      • visitSos

        public void visitSos​(int marker,
                             byte[] markerBytes,
                             byte[] imageData)
        Specified by:
        visitSos in interface JpegUtils.Visitor