mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-05 04:25:29 -04:00
TMI-101, 102 & 103: Now better handles broken data (throws IIOException) and better detects bogus Adobe markers.
This commit is contained in:
parent
1f99040927
commit
5b95f57066
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user