-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doing multi-injection multiple times causes the injected image to be corrupted #12
Comments
Verified
|
Verified "good thumb image" by jp2file and can pass verification. |
Can not reproduce this issue by using James' example: Note
Source and Workable Multi-Injection Images Source image Workable multi-injection image created by James' example w/ the patch
The thumbnail is generated by Workable multi-injection image created by |
I can reproduce this issue on storage-backend instance. steps to reproduce
Both AWS venv and my local venv have the same deps
Action
|
DLC server needs to install the system dependencies
Got the error when install the
Root cause: libboost fails to create correct symbolic links. We need to create them manually:
then I can create correct CAI images on DLC server.
System dependencies on storage-backend dev, DLC server, and Bofu's devenv: storage-backend dev
DLC
Bofu's devenv
|
Found another case of corrupted image from production site. Here are 4 related images: downtown-koto-ku.jpg (original image, has CAI info): downtown-koto-ku-thumbnail.jpg (original thumbnail, has no CAI): downtown-koto-ku_cai__3__.jpg (CAI injected by backend, corrupted): downtown-koto-ku-cai-cai-cai.jpg (CAI injected with sha256sum
Injecting the original image with the original thumbnail results in a corrupted image with correct CAI info. (can be extracted by |
Another corrupted image: https://drive.google.com/file/d/1U8XhsSFdrSFLLrio1AuLA4wXJvHoQ95k/view?usp=sharing It might be easier to find the the common trait of these images and find the root cause if we could find more cases like this |
Image Viewer shows the error when opening
metadata structure in JPEG
|
Question: Is thumbnail put at the right position? Starting and ending bytes in
CAI Injection position
Thumbnail position
SOI & DQT positions (
SOS position (
|
CAI parsing result: downtown-koto-ku.txt |
CAI parsing result: downtown-koto-ku-cai-cai-cai.txt There is a duplicate label
However, it seems not be the root cause. I did some experiments
the output images are still broken. |
James 6:09 PM |
@bafu 可以幫我是這兩張嗎? 先前說不能 inject 的圖 |
Fixed by commit 1dcf02a. |
DQT #00 disappears in the injected photo.
|
There are 2 scenarios of this issue. I'm not sure if they share the same root cause, but since the scenarios are similar I'll include both here.
Scenario 1
When using the modified example script, leaving the thumbnail_bytes empty will corrupt the 3rd multi-injected image, and no exception is raised during the process.
Modified example script
This is a minimal modification base on https://github.com/numbersprotocol/starling-cai/blob/master/utils/starling_multiple_injection.py to reproduce the issue.
Run the script with
python3 <script-file> <jpeg-image-to-be-injected>
Corrupted image
Scenario 2
This thirdly injected image has valid thumbnail_bytes value (it can be seen on the Verify site), but it is still corrupted. I haven't figured out the reason yet.
Corrupted image
The text was updated successfully, but these errors were encountered: