/** * Create a new ImageFactory. This instance will scale loaded images * if they exceed the threshold arguments. * @param maxImageWidth the maximum width of input images * (-1 means no limit) * @param maxImageHeight the maximum height of input images * (-1 means no limit) */ public ImageFactory(int maxImageWidth, int maxImageHeight) { setMaxImageDimensions(maxImageWidth, maxImageHeight); }
/** * Sets the maximum image dimensions, used to control scaling of loaded * images. This scaling is enforced immediately upon loading of the image. * @param width the maximum width of images (-1 for no limit) * @param height the maximum height of images (-1 for no limit) */ public void setMaxImageDimensions(int width, int height) { if ( m_images == null ) m_images = new ImageFactory(); m_images.setMaxImageDimensions(width, height); }