Hi
I have two instances where I'm converting a TIFF file before sending the data to google vision AI. Using CLI, the base64 string works fine. I get the expected response
When I use Java I'm getting a different out, which causes my API call to fail. The base64 output is different.
imageBytes = Files.readAllBytes(new File(fileLocation).toPath());
String imageString = Base64.getEncoder().withoutPadding().encodeToString(imageBytes);
// API response "message": "Unsupported input file format."
I'm looking for suggestions on how to convert a file (tiff, pdf, png) to base64 using plain Java