Convert Data-URL to BufferedImage
问题 I have a Data-URL from an image file and have to pass it through to another function. Along this path from Data-URL to the BufferedImage it needs to be a byteArray. my approach was the following: String dataUrl; byte[] imageData = dataUrl.getBytes(); // pass the byteArray along the path // create BufferedImage from byteArray BufferedImage inputImage = ImageIO.read(new ByteArrayInputStream(imageData)); // If the picture is null, then throw an unsupported image exception. if (inputImage == null