OpenStego is a steganography application that provides two functionalities: a) Data Hiding: It can hide any data within an image file. b) Watermarking: Watermarking image files with an invisible signature. It can be used to detect unauthorized file copying.
First, just want to say thank you for the great work on Openstego! Really appreciated.
I try to use it for a big image dataset and I notice an unexpected behavior : some valid images can create NullPointerException. I "successfully" reproduce it every time with command line. I didn't test with GUI.
Stack trace:
com.openstego.desktop.OpenStegoException: java.lang.NullPointerException
at com.openstego.desktop.OpenStego.embedMark(OpenStego.java:156)
at com.openstego.desktop.OpenStego.embedMark(OpenStego.java:178)
at com.openstego.desktop.OpenStegoCmd.executeEmbedMark(OpenStegoCmd.java:251)
at com.openstego.desktop.OpenStegoCmd.execute(OpenStegoCmd.java:128)
at com.openstego.desktop.OpenStego.main(OpenStego.java:355)
Caused by: java.lang.NullPointerException
at com.openstego.desktop.plugin.dwtdugad.DWTDugadPlugin.embedData(DWTDugadPlugin.java:123)
at com.openstego.desktop.OpenStego.embedMark(OpenStego.java:152)
... 4 more
Repro steps:
A dataset is attached to this issue. Download and unzip. It contains 4 files (1 txt and 3 jpgs). The txt just provide URL of the image source. Then, the original image (4000x6000) is: "pexels-kübra-arslaner-13386712_original". A first resize (400x600) of the image has been generated and is available: "pexels-kübra-arslaner-13386712_smaller.jpg". Another resize (30x45) is "pexels-kübra-arslaner-13386712_null_pointer.jpg"
Get Openstego zip to extract its jar
Generate signature with a random password (eg: FKM3u4Yqiw4etwjvzH5ZCFbNFeWUniSBJRdRdzXy): java -jar openstego.jar --gensig --algorithm=dwtdugad --sigfile=/tmp/sigfile_issue --password=FKM3u4Yqiw4etwjvzH5ZCFbNFeWUniSBJRdRdzXy
Use signature to embed a mark in original image (no error) : java -jar openstego.jar --embedmark --algorithm=dwtdugad --sigfile=/tmp/sigfile_issue -cf 'pexels-kübra-arslaner-13386712_original.jpg'
Use signature to embed a mark in first resize image (no error): java -jar openstego.jar --embedmark --algorithm=dwtdugad --sigfile=/tmp/sigfile_issue -cf 'pexels-kübra-arslaner-13386712_smaller.jpg'
Use signature to embed a mark in the smallest image (null pointer exception): java -jar openstego.jar --embedmark --algorithm=dwtdugad --sigfile=/tmp/sigfile_issue -cf 'pexels-kübra-arslaner-13386712_null_pointer.jpg'
Impact:
Users don't understand the reason of the failure. (probably too small image)
When embedmark is used with wildcard on folders, as soon as a single image fails, the remaining images are not watermarked
Expected behavior:
A graceful and self-explanatory message should be provided
With wildcard, Openstego "embedmark" should continue to watermark remaining images of the folder.
Software versions:
openjdk 11.0.16 2022-07-19, OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu118.04), OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu118.04, mixed mode, sharing)
Hi,
First, just want to say thank you for the great work on Openstego! Really appreciated.
I try to use it for a big image dataset and I notice an unexpected behavior : some valid images can create NullPointerException. I "successfully" reproduce it every time with command line. I didn't test with GUI.
Stack trace:
Repro steps:
java -jar openstego.jar --gensig --algorithm=dwtdugad --sigfile=/tmp/sigfile_issue --password=FKM3u4Yqiw4etwjvzH5ZCFbNFeWUniSBJRdRdzXy
java -jar openstego.jar --embedmark --algorithm=dwtdugad --sigfile=/tmp/sigfile_issue -cf 'pexels-kübra-arslaner-13386712_original.jpg'
java -jar openstego.jar --embedmark --algorithm=dwtdugad --sigfile=/tmp/sigfile_issue -cf 'pexels-kübra-arslaner-13386712_smaller.jpg'
java -jar openstego.jar --embedmark --algorithm=dwtdugad --sigfile=/tmp/sigfile_issue -cf 'pexels-kübra-arslaner-13386712_null_pointer.jpg'
Impact:
Expected behavior:
Software versions:
openstego_digital_watermark_null_pointer_exception.zip