Skip to content
Permalink
Browse files
8278047: Few javax/imageio test regressed after JDK-8262297 fix
Reviewed-by: tschatzl
  • Loading branch information
jayathirthrao committed Dec 1, 2021
1 parent fde0b95 commit 84aa0a191b085a3d7cb338fd5e67281d0e4b57be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 86 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -327,8 +327,7 @@ public void write(IIOMetadata streamMetadata,

if (!canEncodeImage(compressionType, colorModel, sampleModel)) {
throw new IOException("Image can not be encoded with compression type "
+ BMPCompressionTypes.getName(compressionType)
+ " and " + colorModel.getPixelSize() + " bits per pixel");
+ BMPCompressionTypes.getName(compressionType));
}

byte[] r = null, g = null, b = null, a = null;
@@ -1457,9 +1456,6 @@ protected boolean canEncodeImage(int compression, ImageTypeSpecifier imgType) {
}
int biType = imgType.getBufferedImageType();
int bpp = imgType.getColorModel().getPixelSize();
if (bpp != 0 && bpp != 1 && bpp != 4 && bpp != 8 && bpp != 16 && bpp != 24 && bpp != 32) {
return false;
}
if (compressionType == BI_RLE4 && bpp != 4) {
// only 4bpp images can be encoded as BI_RLE4
return false;

This file was deleted.

1 comment on commit 84aa0a1

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 84aa0a1 Dec 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.