...
When converting to JPEG packing with the Jasper JasPer library, you get the above assertion:
...
This is a problem in the Jasper library (https://github.com/mdadams/jasper). It seems to be related to the number of bits per value of the input field.
...