decode
Decode data at full size, or null when it is damaged or uses a feature this decoder lacks.
cancellationCheck, when given, runs before each tile and each code block and may throw to stop a decode whose result no longer matters; what it throws comes out of this call as it is.
Decode data with each side divided by reduction, rounded up: 1, 2, 4 or 8. The decoder drops the finest wavelet levels, as OpenJPEG's reduce option does, so the full-size samples never exist. Each output sample is the low-pass value at every reduction-th sample of the image, not the mean of a block. When a component has fewer levels than that, the decoder drops the levels it has and averages blocks of the result for the rest. cancellationCheck runs as for the full decode.
Throws
if reduction is not 1, 2, 4 or 8