LinusU / cwasm-jpeg-turbo

JPEG decoding for Node.js, using libjpeg-turbo compiled to WebAssembly
11 stars 1 forks source link

longjmp not implemented #2

Open LinusU opened 4 years ago

LinusU commented 4 years ago

First reported here: https://github.com/pwlmaciejewski/imghash/issues/21

It seems like some images triggers longjmp.

I'm writing a project which downloads images and then hashes them, storing the result.

Most images work fine, for example: 03dcf908de492beed0776fd3817e5b0d547bd87c Link Works as expected.

However: 6d2ef973522fd71f0e0ea0326e1d6fbbfc6c567c Link

Fails to hash and throws the following error:

Error: Not implemented
    at longjmp (/home/acc/Website/node_modules/@cwasm/jpeg-turbo/index.js:12:22)
    at wasm-function[204]:0x1e969
    at wasm-function[60]:0xa3f5
    at wasm-function[59]:0x92c6
    at wasm-function[209]:0x1f064
    at Object.exports.decode (/home/acc/Website/node_modules/@cwasm/jpeg-turbo/index.js:68:39)
    at decodeImage (/home/acc/Website/node_modules/@canvas/image/index.js:20:17)
    at imageFromBuffer /home/acc/Website/node_modules/@canvas/image/index.js:185:29)
    at /home/acc/Website/node_modules/imghash/index.js:17:22
    at new Promise (<anonymous>)
LinusU commented 4 years ago

Related question at SO: https://stackoverflow.com/q/44263019/148072

bbhopesh commented 4 years ago

Hey @LinusU any update on this? or do we have to wait for changes in the webassembly?

LinusU commented 4 years ago

No updates yet that I'm aware of...

bbhopesh commented 4 years ago

Is it okay if I send PR for imghash that contains uses blockhash-core for core hash calculation but uses jpeg-js like imghash-0.0.3 instead of canvas?

daddybh commented 2 years ago

this happens on decoding cmyk jpeg. @LinusU