floatArrayToBufferedImage
Converts inputArray of type FloatArray to BufferedImage with outputShape provided.
The output BufferedImage will have the same ColorMode as arrayColorMode of an input tensor.
If isNormalized is true, then inputArray values considered to be in [0..1) interval and will be rescaled to [0..255) interval. Values that are outside this range are clamped to avoid artifacts on the image.
If an array requires custom processing, one can use method variation that accepts ArrayTransform.
Return
BufferedImage result image.
Parameters
float array to convert.
shape of the output image.
ColorMode of an inputArray.
Boolean that indicates inputArray should be rescaled to [0..255) interval.
Converts inputArray of type FloatArray to BufferedImage with width and height provided.
The output BufferedImage will have the same ColorMode as arrayColorMode of an input tensor.
If isNormalized is true, then inputArray values considered to be in [0..1) interval and will be rescaled to [0..255) interval. Values that are outside this range are clamped to avoid artifacts on the image.
If an array requires custom processing, one can use method variation that accepts ArrayTransform.
Return
BufferedImage result image.
Parameters
float array to convert.
width of the output image.
height of the output image.
ColorMode of an inputArray.
Boolean that indicates inputArray should be rescaled to [0..255) interval.
Converts inputArray of type FloatArray to BufferedImage with width and height provided. If a custom arrayTransform is needed, lambda or ArrayTransform can be provided.
The output BufferedImage will have the same ColorMode as arrayColorMode of an input tensor.
If an arrayTransform is given, then arrayColorMode is interpreted as a color mode of an array after transform.
inputArray is explicitly copied before applying arrayTransform.
Return
BufferedImage result image.
See also
Parameters
float array to convert.
shape of the output image.
height of the output image.
ColorMode of an inputArray.
ArrayTransform implementation. Thanks to Kotlin SAM convention it can be supplied as (FloatArray) -> FloatArray lambda.