AbstractMultiLevelSource implements MultiLevelSource { @Deprecated public static Dimension getImageDimension(int width, int height, double scale) { final float scaleFactor = (float) (1.0 / scale); final RenderedOp c = ConstantDescriptor.create((float) width, (float) height, new Float[]{0.0f}, null); final RenderedOp s = ScaleDescriptor.create(c, scaleFactor, scaleFactor, 0.0f, 0.0f, null, null); return new Dimension(s.getWidth(), s.getHeight()); } protected  AbstractMultiLevelSource(MultiLevelModel multiLevelModel); @Override MultiLevelModel getModel(); @Override synchronized RenderedImage getImage(int level); @Override Shape getImageShape(int level); @Override synchronized void reset(); @Deprecated static Dimension getImageDimension(int width, int height, double scale); @Deprecated static Rectangle getImageRectangle(int minX, int minY, int width, int height, double scale);  }
@Test public void testImageDimension() throws Exception { assertEquals(new Dimension(1024, 512), AbstractMultiLevelSource.getImageDimension(512, 256, 0.5)); assertEquals(new Dimension(768, 994), AbstractMultiLevelSource.getImageDimension(384, 497, 0.5)); assertEquals(new Dimension(192, 248), AbstractMultiLevelSource.getImageDimension(384, 497, 2.0)); }