class ImageSparkTransform {

    public Base64NDArrayBody toArray(SingleImageRecord record) throws IOException {
        ImageWritable record2 = imageTransformProcess.transformFileUriToInput(record.getUri());
        INDArray finalRecord = imageTransformProcess.executeArray(record2);

        return new Base64NDArrayBody(Nd4jBase64.base64String(finalRecord));
    }

}