mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-04-30 00:00:01 -04:00
TMI-101, 102 & 103: Now better handles broken data (throws IIOException) and better detects bogus Adobe markers.
This commit is contained in:
-2
@@ -559,13 +559,11 @@ public class JPEGImageReader extends ImageReaderBase {
|
|||||||
if (adobeDCT != null) {
|
if (adobeDCT != null) {
|
||||||
switch (adobeDCT.getTransform()) {
|
switch (adobeDCT.getTransform()) {
|
||||||
case AdobeDCTSegment.YCC:
|
case AdobeDCTSegment.YCC:
|
||||||
// TODO: Verify that startOfFrame has 3 components, otherwise issue warning and ignore adobeDCT
|
|
||||||
if (startOfFrame.components.length != 3) {
|
if (startOfFrame.components.length != 3) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return JPEGColorSpace.YCbCr;
|
return JPEGColorSpace.YCbCr;
|
||||||
case AdobeDCTSegment.YCCK:
|
case AdobeDCTSegment.YCCK:
|
||||||
// TODO: Verify that startOfFrame has 4 components, otherwise issue warning and ignore adobeDCT
|
|
||||||
if (startOfFrame.components.length != 4) {
|
if (startOfFrame.components.length != 4) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user