public class KakaduUtilities extends Object
Modifier and Type | Field and Description |
---|---|
static double |
BIT_TO_BYTE_FACTOR |
static double |
DOUBLE_TOLERANCE |
Modifier and Type | Method and Description |
---|---|
static void |
computeRegions(Rectangle sourceBounds,
Dimension destSize,
ImageWriteParam param)
Compute the source region and destination dimensions taking any parameter
settings into account.
|
static int[] |
findOptimalResolutionInfo(int sourceDWTLevels,
int newSubSamplingFactor)
Find the optimal subsampling factor, given a specified subsampling factor
as input parameter, as well as the number of DWT levels which may be
discarded.
|
static List<ImageReaderWriterSpi> |
getJDKImageReaderWriterSPI(ServiceRegistry registry,
String formatName,
boolean isReader) |
static void |
initializeKakaduMessagesManagement()
Initializing kakadu messages as stated in the KduRender.java example
|
static boolean |
isKakaduAvailable()
Returns
true if the Kakadu native library has been loaded. |
static void |
loadKakadu()
Forces loading of Kakadu libs.
|
static boolean |
notEqual(double value,
double reference) |
static BufferedImage |
subsampleImage(ColorModel cm,
BufferedImage bi,
int destinationWidth,
int destinationHeight,
int interpolationType)
Transforms the provided
BufferedImage and returns a new
one in compliance with the required destination bimage properties,
adopting the specified interpolation algorithm |
public static final double DOUBLE_TOLERANCE
public static final double BIT_TO_BYTE_FACTOR
public static int[] findOptimalResolutionInfo(int sourceDWTLevels, int newSubSamplingFactor)
sourceDWTLevels
- the number of DWT levels in the source imagenewSubSamplingFactor
- the specified subsampling factor for which we need to find
an optimal subsampling factorpublic static void initializeKakaduMessagesManagement()
public static List<ImageReaderWriterSpi> getJDKImageReaderWriterSPI(ServiceRegistry registry, String formatName, boolean isReader)
public static BufferedImage subsampleImage(ColorModel cm, BufferedImage bi, int destinationWidth, int destinationHeight, int interpolationType)
BufferedImage
and returns a new
one in compliance with the required destination bimage properties,
adopting the specified interpolation algorithmcm
- the ColorModel
to be used in the warpingbi
- the original BufferedImagedestinationRegion.width
- the required destination image widthdestinationRegion.height
- the required destination image heightinterpolationType
- the specified interpolation typeBufferedImage
having size =
destinationRegion.width*destinationRegion.height which is the
result of the WarpAffineresu.public static boolean isKakaduAvailable()
true
if the Kakadu native library has been loaded.
false
otherwise.true
only if the Kakadu native library has been
loaded.public static void loadKakadu()
public static void computeRegions(Rectangle sourceBounds, Dimension destSize, ImageWriteParam param)
public static boolean notEqual(double value, double reference)
Copyright © 2006–2016 GeoSolutions. All rights reserved.