Exception in thread "main" java.lang.IllegalArgumentException: image == null!
at javax.imageio.ImageTypeSpecifier.createFromRenderedImage(Unknown Source)
at javax.imageio.ImageIO.getWriter(Unknown Source)
at javax.imageio.ImageIO.write(Unknown Source)
at y.main(y.java:36)
I am getting this error as i try to modify bytes of an image and generate a new one.
I am trying to hide a
string message by converting it to binary and adding it to last two bits of the image bytes (LSB Steganography).
When a message is typed it gives above error, but if no message is written it doesn't show the error and makes a copy of the image.
I am a beginner at this, any kind of help would be appreciated.