Package com.flir.thermalsdk.image
Class ImageFactory
java.lang.Object
com.flir.thermalsdk.image.ImageFactory
A factory used to create thermal or visual images instances based on provided path or URI.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImageBase
createImage
(@org.jetbrains.annotations.NotNull byte[] data) Creates an instance of a class basing on the provided byte array.static ImageBase
createImage
(@NotNull InputStream stream) Creates an instance of a class basing on the providedInputStream
.static ImageBase
createImage
(@NotNull String absolutePath) Creates an instance of a class basing on the provided path.
-
Method Details
-
createImage
Creates an instance of a class basing on the provided path.- Parameters:
absolutePath
- an absolute path to the image which will be created- Returns:
- Returns a created instance of a subclass of
ImageBase
relevant for provided path. - Throws:
IOException
- when unable to open file with the specified path
-
createImage
Creates an instance of a class basing on the providedInputStream
.- Parameters:
stream
- anInputStream
representing the image which will be created- Returns:
- Returns a created instance of a subclass of
ImageBase
relevant for provided stream. - Throws:
IOException
- when unable to create image from givenInputStream
-
createImage
public static ImageBase createImage(@NotNull @org.jetbrains.annotations.NotNull byte[] data) throws IOException Creates an instance of a class basing on the provided byte array.- Parameters:
data
- a byte array representing the image which will be created- Returns:
- Returns a created instance of a subclass of
ImageBase
relevant for provided byte array. - Throws:
IOException
- when unable to create image from givenInputStream
-