jpeg v6b with lossless support patch and different bits per sample values: 8 bit, 12 bit, 16 bit