-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Fix JpxImage
API issues (PR 17946 follow-up)
#17951
Conversation
This PR is in draft because updating the fuzzer seems to have uncovered another problem related to the OpenJPEG integration:
I have also managed to reproduce this outside of the fuzzer:
This gives the following output:
@calixteman Do you have an idea what could cause this |
I wonder if it could be related to: Maybe we should change it for |
The The code surrounding
|
Please don't forget about our Node.js support as well. |
52e361d
to
cdd8c64
Compare
I confirm it's because of the |
I tested my change with the repro.js made by Tim in Node and I get:
So I guess it works in Node since the string |
Yes, that seems good. The fuzzer has code to ignore such errors (because the data in my reproducer is clearly invalid) but I have stripped all that to provide a minimal script. Nice find! |
This commit changes the `JpxImage.decode` method signature to define the `ignoreColorSpace` argument as optional with a default value. Note that we already set this default value in the `getBytes` method of the `src/core/decode_stream.js` file since this option only seems useful for certain special cases and therefore shouldn't be mandatory to provide. Moreover, the JPX fuzzer is changed to use the new `JpxImage` API.
cdd8c64
to
c08b09d
Compare
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/1f5eda7f52f4ef6/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/32892d2cf177f38/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/1f5eda7f52f4ef6/output.txt Total script time: 26.84 mins
Image differences available at: http://54.241.84.105:8877/1f5eda7f52f4ef6/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/32892d2cf177f38/output.txt Total script time: 38.95 mins
Image differences available at: http://54.193.163.58:8877/32892d2cf177f38/reftest-analyzer.html#web=eq.log |
This commit changes the
JpxImage.decode
method signature to define theignoreColorSpace
argument as optional with a default value. Note that we already set this default value in thegetBytes
method of thesrc/core/decode_stream.js
file since this option only seems useful for certain special cases and therefore shouldn't be mandatory to provide.Moreover, the JPX fuzzer is changed to use the new
JpxImage
API.