This commit is contained in:
prrace 2026-01-27 15:03:09 -08:00
parent 621433818a
commit b936635cbf

View File

@ -53,17 +53,17 @@ public class GetSampleSizeTest {
System.out.println("CSM sample size = " + csm.getSampleSize(numBands)); System.out.println("CSM sample size = " + csm.getSampleSize(numBands));
} }
{ {
MultiPixelPackedSampleModel mppsm = MultiPixelPackedSampleModel mppsm =
new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE, new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
width, height, 4); width, height, 4);
int numBands = mppsm.getNumBands(); int numBands = mppsm.getNumBands();
System.out.println("MPPSM numBands = " + numBands); System.out.println("MPPSM numBands = " + numBands);
if (numBands != 1) { if (numBands != 1) {
throw new RuntimeException("Unexpected numBands"); throw new RuntimeException("Unexpected numBands");
} }
System.out.println("MPPSM sample size = " + mppsm.getSampleSize(numBands)); System.out.println("MPPSM sample size = " + mppsm.getSampleSize(numBands));
} }
{ {
SinglePixelPackedSampleModel sppsm = SinglePixelPackedSampleModel sppsm =
@ -71,9 +71,9 @@ public class GetSampleSizeTest {
width, height, bitMask); width, height, bitMask);
int numBands = sppsm.getNumBands(); int numBands = sppsm.getNumBands();
System.out.println("SPPSM numBands = " + numBands); System.out.println("SPPSM numBands = " + numBands);
if (numBands != 4) { if (numBands != 4) {
throw new RuntimeException("Unexpected numBands"); throw new RuntimeException("Unexpected numBands");
} }
try { try {
System.out.println("SPPSM sample size = " + sppsm.getSampleSize(numBands)); System.out.println("SPPSM sample size = " + sppsm.getSampleSize(numBands));
throw new RuntimeException("No expected AIOBE"); throw new RuntimeException("No expected AIOBE");