Class ImageInfoUtils
java.lang.Object
is.galia.resource.iiif.ImageInfoUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic Size
getTileSize
(Size fullSize, Size physicalTileSize, int minSize) Calculates an optimal information tile size based on a given physical image tile size.static int
maxReductionFactor
(Size fullSize, int minDimension) static int
minReductionFactor
(Size fullSize, long maxPixels)
-
Method Details
-
maxReductionFactor
- Parameters:
fullSize
- Full size of the source image.minDimension
- Minimum allowed dimension.- Returns:
- Maximum reduction factor to be able to fit above the minimum allowed dimension.
-
minReductionFactor
- Parameters:
fullSize
- Full size of the source image.maxPixels
- Maximum allowed number of pixels.- Returns:
- Minimum reduction factor to be able to fit below the maximum allowed number of pixels.
-
getTileSize
Calculates an optimal information tile size based on a given physical image tile size.- Parameters:
fullSize
- Size of the full source image.physicalTileSize
- Size of the source image's tiles. If the source image is not natively tiled, this should be equal to fullSize.minSize
- Minimum allowed dimension.- Returns:
- Information tile size.
-