Hello all,
I have an image stored in a text file as the following:
27\F4\0E\39\C7\E2\33\D4\48\D2\88\CD\EE\04\57\3A\85 \0A\51\79\F1\6A\..........................
I want to convert this string into bufferedImage
I tried the following solution but it is working correctly
String dcmPixelData =Files.toString(new File("./files/imagebytes.txt"), Charsets.ISO_8859_1) // I tried all possible charsets
PixelDatabyte = dcmPixelData.getBytes(charset); // here also I tried all possible charset
bufferedImage = ImageIO.read(new ByteArrayInputStream(PixelDatabyte ));
But my bufferedImage variable is always NULL
I tried other solutions but non of them is working for me
Please help me if you have any ideas???
Kind regards,
Baraa