Added test case for RGB JPEG

+ fixed an issue in getImageTypes to avoid incompatible conversion.
This commit is contained in:
Harald Kuhr
2018-01-05 12:49:54 +01:00
parent 3a86bfab98
commit fb3c5f8440
4 changed files with 40 additions and 2 deletions

View File

@@ -1428,8 +1428,9 @@ public abstract class ImageReaderAbstractTest<T extends ImageReader> {
catch (IIOException | IllegalArgumentException expected) {
// TODO: This is thrown by ImageReader.getDestination. But are we happy with that?
String message = expected.getMessage().toLowerCase();
if (!(message.contains("destination") && message.contains("type"))) {
// Allow this to bubble up, du to a bug in the Sun PNGImageReader
if (!(message.contains("destination") && message.contains("type")
|| message.contains("num source & dest bands differ"))) {
// Allow this to bubble up, due to a bug in the Sun PNGImageReader
throw expected;
}
}