I've been working with storing data in pictures as a fun side project. I have managed to create an image using bytes loaded from another image. However, I would like to take any array of bytes and save the array of bytes as pixels in an image using java. What would be the best approach and how should I calculate the height width ect. Thanks!
Asked
Active
Viewed 2,115 times
2
-
I can't understand the format of your input. Maybe you can try ImageIO.read(new ByteArrayInputStream(bytes)). – zsxwing Mar 16 '12 at 04:33
-
1You might need this for references: > [http://stackoverflow.com/questions/1580038/byte-array-to-image-file](http://stackoverflow.com/questions/1580038/byte-array-to-image-file) and this > [http://stackoverflow.com/questions/1212882/convert-byte-array-to-image-in-java-without-knowing-the-type](http://stackoverflow.com/questions/1212882/convert-byte-array-to-image-in-java-without-knowing-the-type) – jaselg Mar 16 '12 at 05:45