pylibjpeg-openjpeg icon indicating copy to clipboard operation
pylibjpeg-openjpeg copied to clipboard

Encoding random 1-bit images fails

Open scaramallion opened this issue 1 year ago • 1 comments

There's an upstream issue with openjpeg not encoding 1-bit images correctly if they're over a certain size. Which I missed in testing because I set the upper limit on the random arrays incorrectly (range is [0, high), not [0, high]...)

Workaround is to use a precision of 2 instead.

scaramallion avatar Mar 17 '24 10:03 scaramallion

After a bit more exploring I think that this should be OK for most normal 1-bit images, it's using purely random images that's one of the causes of the issue.

scaramallion avatar Mar 20 '24 22:03 scaramallion