Class JPEGSegmentImageInputStream.DownsampledDQTReplacement
java.lang.Object
com.twelvemonkeys.imageio.plugins.jpeg.JPEGSegmentImageInputStream.Segment
com.twelvemonkeys.imageio.plugins.jpeg.JPEGSegmentImageInputStream.ReplacementSegment
com.twelvemonkeys.imageio.plugins.jpeg.JPEGSegmentImageInputStream.DownsampledDQTReplacement
- Enclosing class:
JPEGSegmentImageInputStream
static final class JPEGSegmentImageInputStream.DownsampledDQTReplacement
extends JPEGSegmentImageInputStream.ReplacementSegment
Workaround for a known bug in com.sun.imageio.plugins.jpeg.DQTMarkerSegment, throwing exception,
if the DQT precision is 16 bits (not 8 bits). Native reader seems to cope fine though.
This downsampling of the quality tables, creates visually same results, with no exceptions thrown.
- Version:
- $Id: JPEGSegmentImageInputStream.java,v 1.0 30.01.12 16:15 haraldk Exp$
-
Field Summary
Fields inherited from class JPEGSegmentImageInputStream.ReplacementSegment
data, pos, realLengthFields inherited from class JPEGSegmentImageInputStream.Segment
length, marker, realStart, start -
Constructor Summary
ConstructorsConstructorDescriptionDownsampledDQTReplacement(long realStart, long start, long realLength, int qtInfo, ImageInputStream stream) -
Method Summary
Modifier and TypeMethodDescriptionprivate static byte[]createMarkerFixedLength(int length, int qtInfo, ImageInputStream stream) Methods inherited from class JPEGSegmentImageInputStream.ReplacementSegment
read, read, realEnd, seekMethods inherited from class JPEGSegmentImageInputStream.Segment
end, toString
-
Constructor Details
-
DownsampledDQTReplacement
DownsampledDQTReplacement(long realStart, long start, long realLength, int qtInfo, ImageInputStream stream) throws IOException - Throws:
IOException
-
-
Method Details
-
createMarkerFixedLength
private static byte[] createMarkerFixedLength(int length, int qtInfo, ImageInputStream stream) throws IOException - Throws:
IOException
-