feat(decode): add tolerantDecoding option#57
Conversation
patrickhulce
left a comment
There was a problem hiding this comment.
thanks very much for raising this and fixing @Dewep!
is the way you arrived at a broken JPEG a reproducible process we could go through with a public image to have a test for this?
lib/decoder.js
Outdated
| useTArray: false, | ||
| colorTransform: true | ||
| colorTransform: true, | ||
| tolerantDecoding: true |
There was a problem hiding this comment.
to avoid any future breaking change based on tolerantDecoding, how do you feel about this being off by default?
|
I will have enabled the default option since this is the behavior of other readers, otherwise the lib will crash in all cases. But I understand your hesitation, it is not disturbing to turn it off. I changed the default value, and made the small corrections you suggested. I've searched the internet for images that would have the same issue, without success. And I'm not able to make this picture myself (I clearly don't know enough JPEG for that). The private images in my possession that have this concern all seem to have a name in the form |
patrickhulce
left a comment
There was a problem hiding this comment.
LGTM thanks @Dewep!
closes #56