title: IllegalArgumentException: image == null
body: <p>Hy everyone, I having problems to writting a new image from <strong>base64 tiff (String)</strong></p>
  <pre><code>byte[] dec = Base64.getDecoder().decode(dataDocument.getImagenB64().trim());
  InputStream is = new ByteArrayInputStream(dec);
  BufferedImage bi = ImageIO.read(is);
  ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
  
  ImageIO.write(bi, &quot;jpg&quot;, outputStream);
  String output = DatatypeConverter.printBase64Binary(outputStream.toByteArray());
  </code></pre>
  <p>Im getting <code>IllegalArgumentException: image == null!</code> when ImageIO try to write the new image</p>
  <p>Thanks.</p>