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.
-
Field Summary
Fields inherited from class com.twelvemonkeys.imageio.plugins.jpeg.JPEGSegmentImageInputStream.ReplacementSegment
data, pos, realLength
Fields inherited from class com.twelvemonkeys.imageio.plugins.jpeg.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 com.twelvemonkeys.imageio.plugins.jpeg.JPEGSegmentImageInputStream.ReplacementSegment
read, read, realEnd, seek
Methods inherited from class com.twelvemonkeys.imageio.plugins.jpeg.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
-