Some new encoding/decoding options:
- number of
bits
to write/read per image unit (pixel/DCT coef) - write/read
depth
- shift from LSB selective
filter for JPEG - skip DC coef (first), 0 and 1. Since we havebits
anddepth
params 1 becomesbits << depth
jpeg-comp
- allows to select the JPEG component. By default all components are usedmax-step
- overwrite the calculated max step. Also skip size checks in decoder. Can be useful if data in the image is corrupted
All of these options are intended to improve reliability somehow, but if the image is highly optimized, even this is not enough. Especially JPEG, if PNG is not re-encoded, it is lossless.
Also did some refactoring and added tests.