byte to bufferedImage always NULL?
I have an image stored in a text file as the following:
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 :confused:
I tried other solutions but non of them is working for me
Please help me if you have any ideas???
Re: byte to bufferedImage always NULL?
Read your data of file into string'
Split them when '\' occurs...ans store them serially in array..........'
Then, put --> Red, -->Green, -->Blue, -->Red...and so on...'